View the step-by-step solution to:

ECE 438 / C. Zhou Spring 2013 HWK Assignment #3 Introduction to Digital Simulations Objectives: To become familiar with using a digital computer for...

The assignment is attached here. The assignment should be done in Matlab and there are 6 tasks to be done. Could you help me with this?

ECE 438 / C. Zhou Spring 2013 1 HWK Assignment #3 Introduction to Digital Simulations Objectives: To become familiar with using a digital computer for simulating control systems To learn how to use MATLAB/SIMULINK package To learn how to estimate performance parameters from time-domain data SIMULINK Basic SIMULINK is an extension to MATLAB that uses an icon-driven interface for the construction of a block diagram representation of a process. A block diagram is simply a graphical representation of a process (which is composed of an input, the system, and an output). Basic Steps: 1. Click on the MATLAB button to start MATLAB. 2. Once MATLAB has started up, type simulink (SMALL LETTERS!) at the MATLAB prompt (>>) followed by a carriage return (press the return key). A SIMULINK window should appear shortly, with the following icons: Sources, Sinks, Discrete, Linear, Nonlinear, Connections, and etc. 3. Next, go to the File menu in SIMULINK window and choose New and then Model in order to begin building the block diagram representation of the system of interest. 4. Open one or more of the block libraries and drag the chosen blocks into the active window using the left mouse button. 5. After the blocks are placed, draw lines to connect their input and output ports by moving the mouse over a port and drag using the left button. To make a line with a right angle in it, release the button where you want the corner, then click on the end of the line and drag to create next segment. To add a second line that runs off of an existing line (e.g., to create a feedback loop), click the right mouse on an existing line and drag it. 6. Save the system by selecting Save from the File menu. 7. Open the blocks by double-clicking and change some of their internal parameters. The description of the block is given at the top, followed by parameters. 8. Adjust some simulation parameters by selecting Parameters from the Simulation menu. The most common parameter to change is Stop Time that defines the length of time the simulation will run. Stop time is set 10 seconds by default. 9. Run the simulation by selecting Start from the Simulation menu. You can stop a simulation before completing by selecting Stop from the Simulation menu. 10. View the behavior of the system by attaching Scope blocks to the variables of interest. After the simulation is done, double click the Scope to view the plot. Usually you need to press Autoscale button in order to view the whole figure. Or you can use To Workspace blocks to send data to the MATLAB workspace where you can plot the results using standard MATLAB commands.
Background image of page 1
ECE 438 / C. Zhou Spring 2013 2 Example: One open-loop control system is as following: 1 1 ) ( s s P Set the controller gain K =10. Simulate the system and examine the step response of the closed loop system using an input step size of 2.0 (change the step size by double-clicking on the Step Fcn block). View the controller output u and output y by Scope blocks, and plot output vs. time in MATLAB workspace. Use a Transfer Fcn block for the plant. To design the controller, use a Gain block for the proportional control block, and a Step Fcn block for the input. Tie Scope blocks to the controller output (plant input) and plant output. In order to bring the variables into the MATLAB workspace, tie To Workspace blocks to time from the Clock block, and the output y. Make the step occur at t=1.0 second. Double click To Workspace block, and set “Save format” to “Array”. Library: Step – Sources Gain – Math Operations Transfer Fcn – Continuous Scope – Sinks To Workspace – Sinks Clock -- Sources P(s) K u y Controller Plant r
Background image of page 2
Show entire document
Sign up to view the entire interaction

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.


Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question