Homework #4, ECE G244, MTM G260, Fall 2008
The point of this assignment is to learn how to solve the spring-mass-damper problem three different ways. In the second part of homework #4, you will use these methods to solve more challenging problems.
1. 7.1, Senturia. This is the spring-mass-damper that we have done before. Senturia writes out the equations.
You may use software other than MATLAB to solve the system of differential equations if you prefer.
Note that if you are using MATLAB, and you want to pass parameters to the ode solver (such as ode45) , you need to define an extra parameter (flag, here) in the m-file. For example, the m-file would look like:
function dx = msd(t,x,flag,m,k,b)
and you would solve the system of state equations defined in the function using something like:
[t,y]=ode45('msd',[0 30],[0 0],[],m,k,b);
Where msd is the name of your function, the first matrix defines the range of times to be solved for, the second matrix contains the initial conditions for the two state variables, the options are default (empty matrix), and m,k, and b are the parameters passed to the function. Information under the help index in MATLAB for "differential equation solvers" is useful.
2. Solve the same problem, but with typical MEMS parameter values using Simulink. See the attached Homework 4 examples for an example Simulink file. Enter values for mass, spring constant, and damping corresponding to underdamped, critically damped, and overdamped responses. Choose values that you think might be typical of a MEMS device. Change the source frequency as required to see the entire transient response. Observe the output waveform to see that the characteristics are as expected. Report the values that you used, and a plot of the position response.
Look at page 25 of the text for some hints on how to do this. I found that for some conditions, I had to increase the simulation accuracy (under simulation-> parameters in the menu). Note that you will also have to adjust the parameters of the low-pass filter on the force input depending on the frequency of interest. Experiment to see why it is present.
3. Use PSpice or any other version of spice (see download information on the course web site) to analyze a system with the same spring constant, mass and damping constant as in problem 2. Use an effort source (force/voltage) to drive the circuit. Perform a transient analysis to see (hopefully) output waveforms similar to those you saw in problem 2. Also use an ac analysis covering the frequency range of the resonance to confirm that the resonant frequency is as predicted by theory.
To draw the circuit, use schematics. Open the part browser (the binocular icon, or under draw -> get new part) and place the parts. Draw wires between the parts. When drawing the circuit, you must add a ground connection before Spice will analyze the circuit. I used earth ground. You will probably want to use the pulse source for the transient analysis, and the sinuosoidal source for the ac analysis.
You need to set up the analysis. Under analysis, pick transient, and pick your time range. Also under analysis/options, I found that I needed to decrease the RELTOL parameter by a factor of 10 to get a good solution. Finally, you will need to edit the source properties. Double click on the source. The relevant parameters are V1, V2, TR, TF, PW, PER, which are the two voltage states of the excitation the risetime of the pulse, the fall time of the pulse, the pulse width, and the period of the pulse.
After the circuit is analyzed currents and voltages are available. If you want to get the position, note that the position is related to the voltage on the capacitor (both are integrals of the current/velocity). You need to make certain that you have the capacitor voltage. Depending on where your ground node is (the zero volt reference) you will have to subtract two node voltages (spice will do this for you).
4. 6.2, Senturia.