From ControlTheoryPro.com

Contents 
1 Introduction to Single Degree of Freedom, Free Undamped Vibration
A body of mass m is free to move along a fixed horizontal surface. A spring of stiffness k is fixed at one end and attached to the mass at the other end. The horizontal force F can be used to disturb the mass or control it.
At equilibrium the spring force (kx) is equal to 0. Define x = 0 to be at the spring's equilibirum. Moving the mass to the right (+x) will cause the spring to pull the mass to the left. Moving the mass to the left of x = 0 causes the spring to push the mass to the right. In this ideal system there is no damping so moving the mass to position x0 will cause the mass to oscillate between x0 and +x0.
2 Equations for Single Degree of Freedom, Free Undamped Vibration^{[1]}
Givens 

Constant Mass 
Spring stiffness is Constant 
Spring mass is negligible 
Modeling Stages  

Stage I:  Devise a mathematical or physical model of the system to be analyzed.  
Stage II:  From the model, write the equations of motion.  
Stage III:  Evaluate the system response to relevant specific excitation.  
Upon examination of the free body diagram (FBD) the equation of motion for the system is
or  (2.1) 
The solution to this simple harmonic motion equation is
(2.2) 
where
 and are constants.
A and B can be found by considering the initial conditions and the natural frequency . Substituting (2.2) into (2.1)
Since (otherwise no motion),
rad/s 
and
Now
at 
thus
, and therefore 
and
at 
thus
, and therefore 
that is,
(2.3) 
System parameters control ω and the type of motion but not the amplitude. The mass is important but the weight is not; so for a given system the natural frequency, ω, is independent of the local gravitational field.
The frequency of vibration , f, is given by
, or Hz  (2.4) 
The period of oscillation, τ, is the time taken for 1 complete cycle.
seconds  (2.5) 
3 Control of a Single Degree of Freedom, Free Undamped Vibration System
3.1 StateSpace Formulation
Using the equations of motion we can create a statespace model of the system.
Use the following substitution
then
where
 is
 is the control force.
and
where
 is
 is
 is the output.
For this example we want to control position so
and 
3.2 Transfer Function Formulation
The transfer function equivalent to this statespace example is
This is equivalent to a standard 2^{nd} order system where , and . Considering a second order system with a damping coefficient of 0 we would expect a large spike at the natural frequency of .
3.3 Controller Design
This simple single DOF undamped system will be used to explore a couple of different controller design techniques.
3.3.1 Simple Integrator
The following MATLAB code will create a state space object
>> A = [0, k/m ; 1, 0]; >> B = [1 ; 0]; >> C = [0, 1]; >> D = 0; >> sys = ss(A, B, C, D);
Adding an integrator (transfer function object) for control produces the following open loop (as a transfer function object)
>> int = tf([1], [1 0]); >> ol = int * tf(sys);
To form the closed loop
>> cl = ol / (1 + ol); >> [z, p, k] = zpkdata(cl, 'v') z = 0 0 +/ 0.3162i p = 0 0.4833 +/ 0.8949i 0.9667 0.0000 +/ 0.3162i k = 1
Note that the closed loop system is unstable  2 poles in right half plane (RHP).
3.3.2 PILead
This author (Gabe) has seen a lot of 2^{nd} order systems at work. Typically these systems are well controlled by a PILead controller. This type of controller combines a PI controller with a Lead Controller to improve the phase margin of the system under control.
The PI Controller has the following form
The Lead Controller has the following form
where
 so that the phase "hump" created by the controller is positive.
I haven't found many resources on how to decide where to place the PI controller zero. My thinking is that you place the zero where you need to in order to achieve the disturbance rejection that the system requires. In other words if you are controlling a 2^{nd} order system that requires 40 dB of disturbance rejection at 1 Hz then your PI zero needs to be no lower than 100 Hz; this is because the integrator will give you approximately 20 dB per decade of rejection. Let's assume that a PI zero at 100 Hz will provide ample disturbance rejection.
The Lead controller is incorporated to improve phase margin. Phase margin is calculated at the open loop crossover frequency so the peak phase improvement from the Lead controller should occur at approximately the open loop crossover. The peak phase improvement occurs at the geometric mean. For the sake of this example let's place the open loop crossover at 200 Hz.
The MATLAB commands for the PILead are
>> f = 200 * (2*pi); % Open Loop Crossover >> z = 100 * (2*pi); % Zero for PI >> X = 10; % Separation factor for Lead >> a = f / sqrt(X); % Zero for Lead >> b = f * sqrt(X); % Pole for Lead >> cntl = tf([1 z], [1 0]) * tf([1 a], [1 b]);
The open loop system is formed by
>> ol = cntl * tf(sys);
The gain adjustment to achieve an open loop crossover at f
>> [mag] = bode(ol, f); >> ol = 1/mag * ol;
The closed loop system is formed like this
>> cl = ol / (1 + ol);
MATLAB's isstable command returns false for the closed loop system. The margin command will return a plot with 28° of phase margin. However, the pole command will show the only unstable poles to be approximately 2E16. This may well be a truncation error. The result of the step command does not look unstable.
4 Final Notes on Control of Single DOF Undamped System
We know that stable 2^{nd} order systems can be created. This system, without damping, is not really stable. The integrator and PILead controls were designed to control the position of the mass m.
The main part of the 2^{nd} order systems that is missing is the damping. Damping operates on the velocity of the mass m. This example could be reformulated as a velocity control problem. When you wish to control position but do it through control of the velocity some alterations are required.
5 Notes
Beards, C. F. 1995 Engineering Vibration Analysis with Applications to Control Systems. ISBN 034063183X
5.1 References
 ↑ Beards, pp. 1113