Question
LAB ASSIGNMENT 3 (due 09/17/19 11:59 PM) ___________________________ Consider the following 3rd order system represented in discrete time. We're looking for the transient (unforced) behavior
LAB ASSIGNMENT 3 (due 09/17/19 11:59 PM) ___________________________
Consider the following 3rd order system represented in discrete time. We're looking for the transient (unforced) behavior of this 3rd order system. The output at n+1 is represented as a linear combination of outputs at times n,n-1 and n-2.
v[n+1] = a*v[n] + 0.25*v[n-1] + b*v[n-2] (**)
We would like to determine those values of a and b on the 100 x 100 discrete grid (you can also use MATLAB Command linspace)
a = 0 : 0.0202 : 2 ;
b = 0 : 0.0202 : 2 ;
for which the output v[n] is a bounded signal, i.e., there exists a finite value M such that the magnitude of v[n] is less than M=2000 for all n.
Since we need to stop at some n, we will use the following criterion for boundedness: v[n] is bounded if by time n=kMax, all output samples are less than M in absolute value. Out of these bounded samples, those (a,b) pairs which gives the final output sample in the corresponding vector to be less than 2000 in absolute value, are saved in a matrix S of size "number of bounded samples" x 2. Each of those (a,b) pairs in S are then plotted where a is the x element and b is the y element in the plot . The remaining (a,b) pairs wil be saved in a matrix T in the same format and then plotted.
The idea is very similar to the one developed in Lab 3 for the Mandelbrot set. Here are some pointers:
- Initialize both S and T to [ ] ;
- Use two nested FOR loops to cover the (a,b) grid.
- Use the vector vec to store the output samples produced by (**)
- Initialize vec to [0; 0; 1] and n=3. That means, (**) will be used to compute output samples starting at time n = 3, assuming that the outputs at times n =0 and n = 1 were both zero and output at n=2 is set to 1 (also known as initial conditions).
- Use a WHILE loop that
- computes the new output sample v using (**) - vnew
- get the absolute value of new output sample
- appends vnew to vec
- increments n as long as the output is less than M=2000 in absolute value and the size of vec does not exceed n=2000 (i.e.<=2000).
- Append (a,b) to S if the boundedness test is passed; otherwise append (a,b) to T
- Plot the points in S using o (circle) as markers, and those in T using .(point).
______________________________________________________________________________________
Submit a zip/rar package containing the following two files (use exact file names as shown):
lastname_labhw_03.m M-file containing the MATLAB code and any additional comments or explanations on separate lines preceded by % (comment character). Please put your name and student ID on the first line.
lastname_labhw_03.pdf Figure saved in PDF format.
The zip/rar package should be named as lastname_labhw_03.zip/rar, and should be submitted to the entry for Lab Assignment 3 on ELMS. Go to ENEE222 -> Assignments -> Lab 03 Assignment
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started