Tuesday, November 3, 2009

Reachability

I've added relatively complete notes regarding Chapter 6 of the Astrom and Murray textbook under that tag "Reachability Demo". You'll find the notes themselves under the supplementary materials list, and you can download the matlab files from under downloads.




The point of these notes is to illustrate the key topics of the chapter using Matlab demonstrations. There are some significant extensions as well, especially with regard to the use of convex optimization to compute control open-loop control trajectories.  Please take time to review these notes, and spend time with the "Self-Study Exercises".

To do the optimizations, you'll need to download and install the CVX package for convex optimization in Matlab. You'll be amazed by the capabilities it adds to your Matlab toolkit.

Saturday, October 10, 2009

Monomolecular Kinetics

I've just posted my notes on Monomolecular Kinetics.  This is much the same as we talked about in class, with the addition of a few extra comments on straight-line reaction paths.  There are some suggested exercises on the last page of the notes.

I've also posted Matlab demo illustrating the properties of monomolecular reaction systems.



Friday, October 9, 2009

Linear System Demo

I've uploaded a demo illustrating various techniques for working with linear systems in Matlab. The techniques include
  • linearization of a nonlinear model, 
  • comparing the impulse and step responses of the linear and nonlinear systems, 
  • comparison of linear simulation and use of the matrix exponential
  • finding key points in the impulse and step responses,
  • illustration of frequency response and various methods of computation 


You can see the output from the demo from the link on under Supplementary materials, or download the Matlab code and work with it directly. There are some suggested exercises on the last page. You may want to give these a try, and let me know if you have any questions.

Frequency Response Notes

To augment the textbook's discussion on the frequency response of linear systems, I've some notes (Frequency Response) that you may find useful.  These notes provide a simple derivation of frequency response as outlined in class on 10/8/2009 using complex variables.

Thursday, October 8, 2009

Homework Assignment

The following Assignment is due Tuesday, October 13th:

1.  Problem 5.7.
2.  Do the calculations shown in Example 5.7 (page 151) using Matlab. Compute the impulse, step, and frequency domain response of the system.  The model equations are given on pages 86-87, and assume the following parameter values:
  • V_1 = 0.07 L/kg (blood volume)
  • V_2 = 0.40 L/kg (intracellular fluid volume)
  • q_0 = q = 0.0015 L/min/kg (outflow)
  • c_0 = 1.0 (normalized input concentration)
3.  For the system in problem 2, compute the steady state value of u necessary to obtain C_2 = 1 for the second compartment.
4.  Suppose you can apply an initial impulse and a step function input the system of Example 5.7. These correspond to an initial dose followed by a steady state input to the compartment model. What should be the maximum size of these inputs so that the final value of C_2 is 1.0, and the concentration never goes over 2.0?

Thursday, September 24, 2009

Modal Decomposition

Modal decomposition constructs a similarity transformation for a linear system where the resulting coefficient matrix is a block diagonal structure corresponding to the real and complex eigenvalues. See problem 4.14 of Astrom and Murray for a description of the transformed coefficient matrix.  The download ModelDemo.zip contains a Matlab function modal.m to compute the modal decomposition for an arbitrary coefficient matrix, and a function ModalDemo.m to illustrate the application to a randomly 3D linear system.

Wednesday, September 23, 2009

Eigen Decomposition of Linear Systems

One of the basic tools for understanding linear, time-invariant systems is the 'modal' decomposition on to a set of 'eigendirections'.  This is illustrated in the matlab files in the Eigen Decomposition Demo download.



Run the script S_EigenDemo.m to create versions of the plot shown above. The script selects random eigenvectors and assigns eigenvalues for a 3D system, then calls a function to superimpose a trajectory over a representation of the eigendirections.

To test your understanding, try the following exercises:
  1. Change the real parts of the eigenvalues to obtain other types of behavior.  What happens if you make the real eigenvalue much more negative, or slightly positive? What happens if you make the real part of the complex conjugate pair slightly positive?
  2. How can you make the simulated trajectory orbit the real eigenvector in a plane parallel to the other two eigendirections?