Hi all,
I'm trying to model skin effect using VerilogA. And I got the sample from Ken's website: https://designers-guide.org/modeling/ind.pdf
Here's the model:
`include "constants.vams"
`include "disciplines.vams"
module skin_effect(p, n);
electrical p, n;
parameter real f0=1 from (0:inf);
parameter real f1=10 from (f0:inf);
parameter real r0=1 from (0:inf);
`define lumps 100
real mult, mult2, wp, wz;
real zeros[0:2*`lumps-1], poles[0:2*`lumps-1];
integer i;
analog begin
@(initial_step("static")) begin
mult = pow(f1/f0, 1.0/(4*`lumps)); //May the factor in front of lumps, we can change.
mult2 = mult*mult;
wz = 2*`M_PI*mult*f0;
wp = mult2*wz;
for (i=0; i<`lumps; i=i+1) begin
zeros[2*i] = -wz;
zeros[2*i+1] = 0;
poles[2*i] = -wp;
poles[2*i+1] = 0;
wz = mult2 * wp;
wp = mult2 * wz;
end
end
V(p,n) <+ r0*laplace_zp(I(p,n), zeros, poles);
end
endmodule
When I simulated this, I found that both the real and imaginary parts are cut off at around 5MHz.
I experimented with lumps around, but still got the same cut off, any one can shine some light on this problem is greatly appreciated!
Thank you very much,
Menghan