Hi Designer's Guide Community
,
since this is my first post, I wanted to say a few words about myself. My name is Daniel and I do my PHD at the university of Freiburg in germany. I am working on sensor readout electronics for MEMS sensors, especially Lorentz force magnetometers. The problem I am having right now is bugging me for quite some time and until now I could get around it by linearizing. This is no longer possible as I want to simulate a circuit that tunes the resonance frequency of a MEMS structure. I created a model for a 1D Lorentz force magnetometer (torsional) a while ago and implemented the drive and sense capacitances as follows:
Cs1 = Cs*(d/(d-ls*Theta(theta))); //Sensecap1
Cs2 = Cs*(d/(d+ls*Theta(theta))); //Sensecap2
I(Csense1)<+ddt(Cs1*V(Csense1));
I(Csense2)<+ddt(Cs2*V(Csense2));
Tcs1 = ((pow(V(Csense1),2))/(d-ls*Theta(theta))*Cs1*ls*0.5; //torque of Cs1
Tcs2 = ((pow(V(Csense2),2))/(d+ls*Theta(theta))*Cs2*ls*0.5; //torque of Cs2
This leads to some strange phenomena, e.g. if it is driven via the sensecaps at the resonance frequency (I use Cadence Virtuoso and Spectre to simulate), the phase between input voltage and the output (angle in this case) is not 90° but either around 10° or around 180°. I found this article:
http://www.designers-guide.org/modeling/varactors.pdf and changed the capacitances accordingly:
Cs1 = Cs*(d/(d-ls*Theta(theta))); //sensecap1
vCs1 = V(Csense1);
qCs1 = Cs1*vCs1;
I(Csense1) <+ ddt(qCs1);
Cs2 = Cs*(d/(d+ls*Theta(theta))); //sensecap2
vCs2 = V(Csense2);
qCs2 = Cs2*vCs2;
I(Csense2) <+ ddt(qCs2);
Tcs1 = (pow(vCs1,2))/(d-ls*Theta(theta))*Cs1*ls*0.5; //torque of Cs1
Tcs2 = (pow(vCs2,2))/(d+ls*Theta(theta))*Cs2*ls*0.5; //torque of Cs2
The result is even worse. With the first implementation, if the simulator is set to euler-method only, this phase error did not occur. Now it does occur whether euler-only is set or not. I am really sure, that the problem comes from the nonlinear capacitance, as also mentionned in the article. If I use a linear capacitance then everything is working correctly. I tried many different implementations for the torque, or the capacitances but so far nothing has changed the result. I attached the complete model.
I hope someone knows how to solve this. Many thanks in advance
.
Best regards,
Daniel