The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> VerilogA model for 'dependent power source'
https://designers-guide.org/forum/YaBB.pl?num=1438632538

Message started by a_k on Aug 3rd, 2015, 1:08pm

Title: VerilogA model for 'dependent power source'
Post by a_k on Aug 3rd, 2015, 1:08pm

Hi ALL,

I have to model a two port network with `dependent power source` in VerilogA. The input port as shown in the attached figure has a simple dependent current source (where ic is a external control current). The power across the dependent current source is transferred to the output port without any loss. Thus we have an ideal dependent power source at the output port.

The two port network equations are given below:

1) i1 = ic (external current)
2) i2 = const*ic  [const is a constant]
3) v1 = const*v2
4) i1*v1 = i2*v2

The problem that I am facing is that I have to model the output port as both dependent current and voltage sources at the same time which I think is not possible in VerilogA.

Could anyone please tell me how can I model a dependent power source as described above?

Thanks in advance.

Title: Re: VerilogA model for 'dependent power source'
Post by Ken Kundert on Aug 3rd, 2015, 5:14pm

I believe you have too many equations. Perhaps you are trying to model an ideal transformer? It has the characteristic of having the input power equal to the output power.

-Ken

Title: Re: VerilogA model for 'dependent power source'
Post by a_k on Aug 6th, 2015, 9:16am

@Ken,

I am really sorry for the late reply.

I am trying to model a dependent power source (I am not sure if I can call this an ideal transformer as i1 is defined by an external current source which is not a part of input port).

These dependent power sources occur in boundary condition mode operation of Boost converters. I am trying to use the average large signal model for boost converter simulations.

But the problem as I mentioned earlier, is that I have to model the output port as both dependent current and voltage sources at the same time which I think is not possible in VerilogA.

Is there any method that can be used to describe this model in VerilogA?

Title: Re: VerilogA model for 'dependent power source'
Post by Ken Kundert on Aug 6th, 2015, 5:26pm

If you can come up with a reasonable set of equations, describing them in Verilog-A should be easy.

-Ken

Title: Re: VerilogA model for 'dependent power source'
Post by boe on Aug 7th, 2015, 2:24am

a_k, Ken,
I believe, equations 2 and 3 should do the trick... (assuming the const is the same, which is required to satisfy equation 4)
- B O E

Title: Re: VerilogA model for 'dependent power source'
Post by Ken Kundert on Aug 7th, 2015, 11:35am

2) v1 = N v2
3) i1 v1 = i2 v2

Substituting (2) into (3) gives
4) i1  N v2 = i2 v2

or
5) i1  N = i2

Equations (2) and (5) together are the equations for an ideal transformer. I believe the following should work as an ideal transformer model in Verilog-A.


Code:
module ideal_transformer(pp, pn, sp, sn);
parameter real N;
electrical pp, pn, sp, sn;

analog begin
   V(sp, sn) <+ N*V(pp, pn);
   I(pp, pn) <+ N*I(sp, sn);
end
endmodule


-Ken

Title: Re: VerilogA model for 'dependent power source'
Post by a_k on Aug 11th, 2015, 6:11am

@BOE,

Thanks for your suggestion.


@Ken,

Thanks a lot for the code. The equations work for trans analysis.
I will have to check if they work for AC analysis as well.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.