Matlab serie RLC step response plotter

flatspike — jurgen.strydom on November 22, 2006 at 11:58 am

About the project

I wrote this Matlab code to test a project I had to do for my Linear Systems module. We had to measure a human’s step response to a square wave, the wave would slide onto the screen and the user had to follow it with their mouse. After you average the input you had to work out what a 2nd order RLC circuit would have to look like to get a similar response. This Matlab code was part of my effort to investigate the effects of different component values on the output graph. After I receive my marks I may adjust the project little and release it as well.

Under dampedUnder damped case.

Over dampedOver damped case.

Adjustable Settings

  • Time range
  • Resolution (how many points to use)
  • Step size
  • Value for Resistance
  • Value for Capacitance
  • Value for Inductance

Basic Equations

For a series RLC circuit we have two equations to help us determine how the circuit is going to react to the step. The first is the damping factor.

damp factor

And the second is the resonance frequency.

resonance frequency

For each different outcome of these equations a different reaction is expected.

Three Cases

Each case is identified by the resonance frequency and the damping factor. The equations were solved algebraically and coded into each case.

Over damped case
The damping factor is bigger than the resonance frequency.

over damped equation
V equation

Critically damped case
The damping factor is equal to the resonance frequency.

critially damped equation

Under damped case
The damping factor is smaller than the resonance frequency.

under damped equation
V equation

The constants s1,2 and wd can be computed with these equations.

s12 and wd

To get A1 and A2 we take the derivative of the (voltage) equation and solve simultaneously.

Summary

Matlab is a very powerful tool that can accomplish many things. Its unfortunately very expensive and can only really be used by universities and big companies. The plan is to convert this Matlab file to a Delphi program in the near future, so if you don’t have access to Matlab and think you can make use of a Delphi version, hang on, or alternatively e-mail me and tell me to hurry up! :)

References

Mathworks

Files

Series RLC response plotter m-file

Documentation

Series RLC response plotter documentation


Add to:
del.icio.us:Matlab serie RLC step response plotter  digg:Matlab serie RLC step response plotter  reddit:Matlab serie RLC step response plotter

Related:

1 Comment »

  1. […] Electronics: USB powered temperature display (Stage[2/5]) Matlab: Plot smoother Matlab: Series RLC response plotter PHP: flickr photo album PHP: last.fm chart draw […]

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | Flat Spike