The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:19am
Pages: 1
Send Topic Print
RF antenna model in verilogA (Read 153 times)
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
RF antenna model in verilogA
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.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: RF antenna model in verilogA
Reply #1 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
Re: RF antenna model in verilogA
Reply #2 - 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.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: RF antenna model in verilogA
Reply #3 - 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));
 

Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pavel
Senior Member
****
Offline



Posts: 174
Lausanne/Switzerland
Re: RF antenna model in verilogA
Reply #4 - 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
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: RF antenna model in verilogA
Reply #5 - Jun 19th, 2007, 10:25am
 
Glad to hear you got it working; thanks for posting the working code for posterity.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.