|
|
MATLAB/P-SPICE Enrichment Activity 2004 NASA SHARP Program California State University, Los Angeles Presented by: Jenny Martinez/Eric Hamilton Reported by: Alexis Laguna
The MATLAB and P-spice classes were presented to the NASA Sharp students in two separate parts. In the first of the two, the introduction to MATLAB, all twenty of the NASA Sharp students were in attendance once the class started from 9:30am to its closing stages at 12pm. The actual presentation itself was presented in PowerPoint format and was displayed to the class on a projector screen.
The speakers name was Jenny Martinez. She began the presentation by giving a general overview of MATLAB’s foremost purpose arrays. MATLAB is a high-performance programming language for technical computing. It integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. Typical uses include:
MATLAB is a tool for doing numerical computations with matrices and vectors, which can also display information graphically. It is an interactive system whose basic data element is an array that does not require dimensioning. This allows you to solve many technical computing problems, especially those with matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar non-interactive language such as C or Fortran.
MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes are comprehensive collections of MATLAB functions, M-files, stored in the extension (.m), that extend the MATLAB environment to solve particular classes of problems. Areas in which toolboxes are available include signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation, and many others.
The best way to learn what Matlab can do seemed to be to work through some examples at the computer, which is exactly how Jenny Martinez transitioned the presentation. Prior to any hands on activities with the actual programming language, she displayed a number of easy-to-use examples that the class could follow on their own. Such examples include:
·
Zeros(n, m) Two inputs that display matrices of zeros and ones respectively whose dimensions are n by m.
· x = a : b : c; An input that displays a list of numbers from the value of “a” to the value of “c” in increments of the value of “b”, all to be stored in the variable x.
·
img = imread(‘f:\ insert file here’);
or img_color = imread(‘f:\ insert
file here’) Two inputs that display a selected picture in gray-scale or in color respectively.
In the second of the two classes, P-SPICE, all twenty of the NASA Sharp students were present for the entirety of the presentation from 1pm to 4pm. This presentation too, was presented partly using PowerPoint on the projector screen, but towards the end shifted into examples and visuals on the board.
The speaker’s name for the P-SPICE class is Eric Hamilton. As part of his introduction to the program, he went over a general “refresher” on the main components necessary for circuit simulation, which is the function of P-SPICE that was introduced to the class. The important concepts discussed as part of his introduction included resistor (r), current source (VAC), ground (GND), and DC voltage source (VDC).
Since the class seemed to show an aptitude to rapidly absorb the various functions of each part, Eric quickly proceeded to the steps involved in drawing a circuit. The first step in the process is getting the parts, which are obtained by clicking the new parts button. Upon selecting the various desired parts, you must place them in the appropriate positions. To rotate parts so that they will fit in you circuit nicely, click on the part and press "Ctrl+R" (or Edit "Rotate"). To flip them, press "Ctrl+F" (or Edit "Flip"). Now that your parts are arranged well, you'll have to attach them with wires, which can be obtained with the draw wire button. Once the circuit is complete you can edit the various part settings, by double-clicking the relative section of each part, whether it be:
Name: To change the name, double click on the present name (C1, or R1 or whatever your part is), then a box will pop up (Edit Reference Designator). In the top window, you can type in the name you want the part to have. Value: If you only want to change the value of the part (if you don't want all your resistors to be 1K ohms), you can double click on the present value and a box called "Set Attribute Value" will appear. Type in the new value and press OK.
If you double click on the part itself, you can select VALUE and change it in this box.
In order to create a simulation of the completed circuit, a ground is needed on the negative side of the voltage source. Once all of these steps are complete, the simulation results will display the measurements, in amperes, of the overall circuit.
|