The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> RF antenna model in verilogA
https://designers-guide.org/forum/YaBB.pl?num=1181636578

Message started by Pavel on Jun 12th, 2007, 1:22am

Title: RF antenna model in verilogA
Post by Pavel on Jun 12th, 2007, 1:22am

Hello

I have problems modelling RF antenna.

Here is code:

Code:
module ANTENNA (p1, p2, mag_field);
inout p1, p2;
input mag_field;
electrical p1, p2;
magnetic mag_field, mag_induct, mag_flux;

//Coil geometry description
.......................................

// Coil inductance innH
parameter real L = .....;

// Coil area in m^2
parameter real S = ....;

// Angle between magnetic field and normale to coil plane
parameter real alpha = 0;

analog begin
     Phi(mag_induct) <+ `c_MU * Phi(mag_field);
     Phi(mag_flux) <+ Phi(mag_induct) * S * cos(alpha);
     V(p1,p2) <+ ddt(Phi(mag_flux));
     V(p1,p2) <+ L * ddt(I(p1,p2));
end
endmodule


Coil geometry description, coil inductance and coil area calculation I bypassed as this is not significant vis-a-vis of problem.

As you could see from code, antenna coil has 3 ports - 2 electriacl p1 and p2 and one magnetic - mag_field.
Ports p1 and p2 i use to connect antenna coil to circuit, whereas mag_field I use to connect it to generator of magnetic field. The output of this generator has also nature magnetic.

In my schema I connect model in parallel to some capacitance and do transition simulation in ADE (Analog Design Environment).

The problem is that LC tank induced voltage isn't dependent on value of capacitance.

What is wrong in my verilogA description?

Regards

Pavel.

Title: Re: RF antenna model in verilogA
Post by Geoffrey_Coram on Jun 12th, 2007, 3:57am


Pavel wrote on Jun 12th, 2007, 1:22am:

Code:
     Phi(mag_induct) <+ `c_MU * Phi(mag_field);
     Phi(mag_flux) <+ Phi(mag_induct) * S * cos(alpha);
     V(p1,p2) <+ ddt(Phi(mag_flux));
     V(p1,p2) <+ L * ddt(I(p1,p2));


I don't see any MMF() access functions.  Electrical has V and I; magnetic should have Phi and MMF.

Usually when I see a flow_access_function (such as Phi()) on the RHS, this means that you are measuring the flow, and I expect to see a potential contribution.  Here, you are both measuring and contributing the flux, so from a simulator standpoint, I'm not sure what your unknowns are.

Title: Re: RF antenna model in verilogA
Post by Pavel on Jun 12th, 2007, 4:14am

Thank you for response, Geoffrey

How can I implement MMF() in my code. It has no relations with electrical natures (voltage or current).

Regards

Pavel.

Title: Re: RF antenna model in verilogA
Post by Geoffrey_Coram on Jun 12th, 2007, 9:38am

You have an equation for the inductor V = L ddt(I); I expect to see MMF(mag_??) <+ some expression of Phi(mag_??) or vice-versa.  But I haven't worked with magnetics, so my expectation may be wrong.

Another thing you could try, if you're fairly sure you've got all the constitutive relations correct is:


Code:
       real phi_induct, phi_flux;

       phi_induct = `c_MU * Phi(mag_field);
       phi_flux = phi_induct * S * cos(alpha);
     Phi(mag_induct) <+ phi_induct;
     Phi(mag_flux) <+ phi_flux;
     V(p1,p2) <+ ddt(phi_flux);
     V(p1,p2) <+ L * ddt(I(p1,p2));

Title: Re: RF antenna model in verilogA
Post by Pavel on Jun 19th, 2007, 6:47am

Geoffrey, you were right

Finally this code seems to work:


Code:
// VerilogA for OUT_STAGE, COIL_RECT, veriloga

`include "constants.vams"
`include "disciplines.vams"

`define c_MU 4*`M_PI*1e-7

module COIL_RECT (ep, en, mp, mn);
inout ep, en, mp, mn;
electrical ep, en;
magnetic mp, mn, mfp, mfn;

parameter real N = 4;      // number of turns

// Calculating Rectangular Coil geometric parameters
.........................................................

// Calculating inductance in Hn for geometry in m
parameter real L = ...........................................;

// Angle between magnetic field and normale to coil plane
parameter real alpha = 0;

// Average coil area in m^2
parameter real S = ..........................................;

// Coil resistance
parameter real Rl = 1;

analog begin
     Phi(mfp,mfn) <+ N*`c_MU*Phi(mp,mn)*S*cos(alpha);         // Faraday's Law
     MMF(mfp,mfn) <+ N*I(ep,en);                                            // Amper's Law
     V(ep,en) <+ Rl*I(ep,en) - ddt(Phi(mfp,mfn)) + L*ddt(I(ep,en));
end
endmodule


Regards.

Pavel

Title: Re: RF antenna model in verilogA
Post by Geoffrey_Coram on Jun 19th, 2007, 10:25am

Glad to hear you got it working; thanks for posting the working code for posterity.

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