35476 - rpi.edu€¦  · Web view(3pt) If an 8-bit sampler system has a S/N ratio from...

22
HI: 93 AVG: 71.4 LO: 52 ECSE-4760Real-Time Applications in Control & Communications Spring 2018 Exam #2 Wednesday 5/9 11:30 a.m. Jonsson-4309 Name ____SOLUTION _________________ Section 1: MR 1:30 (Grades will be posted on SIS when they are available.) This exam is open book, open notes, etc. with calculators, but NO laptops, Internet connections, cell phones, …, and no sharing materials. You need your own copies of everything, including lab reports. If you didn’t bring your own hardcopies, you will be penalized. Answer questions in only 5 out of the 8 sets corresponding to each of the experiments in the lab. You do not need to choose the experiments you performed but you will probably wish to do so. If you answer more than 5 sets, the first 5 will be graded. Each set is worth 20 points (max) with the breakdown shown by the questions. Setting up a solution is more important than finding the actual value if you are running out of time. If you are missing any grades on RPILMS, make sure you bring the reports to me (JEC-6028) before the end of the day today to get your records corrected. I Digital Logic ______

Transcript of 35476 - rpi.edu€¦  · Web view(3pt) If an 8-bit sampler system has a S/N ratio from...

HI: 93AVG: 71.4LO: 52

ECSE-4760 Real-Time Applications in Control & Communications Spring 2018

Exam #2Wednesday 5/9 11:30 a.m. Jonsson-4309

Name ____SOLUTION_________________ Section 1: MR 1:30

(Grades will be posted on SIS when they are available.)

This exam is open book, open notes, etc. with calculators, but NO laptops, Internet connections, cell phones, …, and no sharing materials. You need your own copies of everything, including lab reports. If you didn’t bring your own hardcopies, you will be penalized.

Answer questions in only 5 out of the 8 sets corresponding to each of the experiments in the lab. You do not need to choose the experiments you performed but you will probably wish to do so. If you answer more than 5 sets, the first 5 will be graded. Each set is worth 20 points (max) with the breakdown shown by the questions.

Setting up a solution is more important than finding the actual value if you are running out of time.

If you are missing any grades on RPILMS, make sure you bring the reports to me (JEC-6028) before the end of the day today to get your records corrected.

I Digital Logic ______II Voice Processing ______

III Binary Communications ______IV Digital Filter ______

V Interactive Graphics ______VI Hybrid Control ______

VII DC Motor ______VIII Optimal Control ______

TOTAL ______

I Digital Logic 2018 Name _________________________

Create a counter that only counts prime numbers less than 16 after a starting sequence of 0, 1, 2, and repeats back to 0. Give the binary values of the states.

1. (2pt) List a binary sequence that meets this requirement for the states starting with 0.

DCBA0000 (0)0001 (1)0010 (2)0011 (3)0101 (5)0111 (7)1011 (11)1101 (13)(0000 …)

2. (5pt) A run/stop input pauses the counter by having it stay in the same state (next state = present state): 1 goes forward and 0 pauses. Find the Next State Table for this machine.

3. (11pt) Find the simplified expression for the input to the least significant bit flip-flop, assuming D-flip-flops are used in the implementation. (May set up 2 Karnaugh Maps: for input = 0 and for input = 1.)

Output: DCBA = states, I = 0 Output: DCBA = states, I = 1BA

DC 00 01 11 10BA

DC 00 01 11 1000 0 1 1 0 00 1 0 1 101 d 1 1 d 01 d 1 1 d11 d 1 1 d 11 d 0 d d10 d d 1 d 10 d d 1 d

A, even stays even & odd stays odd Fill in don’t cares for skipped states

(I = 0) TA = A/I (I = 1) TA = /AI + BI + /DCI TA = A/I + /AI + BI + /DCI

0123571113

InputP.S.

0 1

0000 0000 00010001 0001 00100010 0010 00110011 0011 01010101 0101 01110111 0111 10111011 1011 11011101 1101 0000

4. (2pt) Is it possible to reduce this counter in any way? If so, how?

Since there are only 8 unique states, it can be implemented with only 3 flip-flops (3 bits), but states would need to be mapped into the prime integers

II Voice Processing 2018 Name _________________________

1. (3pt) If an 8-bit sampler system has a S/N ratio from quantization noise of ~35dB, approximately how many more bits should be added to achieve 70dB or better S/N ratio?

70 – 35 = 35dB 35dB/6dB = 5.83 => 6 bits (6dB/bit rule)

2. (9pt) A low order antialiasing filter with too wide a pass band will result in aliasing of some frequencies. If the antialiasing filter’s response is similar to the Sinc function below from 0 – 20kHz and then effectively zero for all frequencies above 20kHz, what effect does this have on the spectrum in the 0 – 40kHz band of a 15kHz input sine wave? (Use equations or appropriately scaled plots to explain results.)

Ideal LPFReconstruction

fco = 10kHz

x-axis is frequency in kHz, y-axis is Volts

0 5 10 15 20 25 30 35 40 450

0.5

1

1.5Input

0 5 10 15 20 25 30 35 40 450

0.5

1

1.5Antialias Filter

0 5 10 15 20 25 30 35 40 450

0.5

1

1.5Sampled

15kHz amplitude ~0.3, after sampling appears at nfs ± 15kHz, n = 0 1 2 …=> doubling amplitude

0 5 10 15 20 25 30 35 40 450

0.5

1

1.5Output

Frequency components in output from 0 – 40kHz (only 5kHz component remains w/ ~0.6 ampl).

3. (4pt) For the following input triangle wave and ideal delta modulator output, determine a possible set of values for A, B, C, and D.

A = 0.1V, B = 0.3V, C = 0.05V, and D = 0.15V,

4. (2pt) Given 2 signals, a ±3V square wave with a period of 1ms and a 4Vp-p sine wave with a period of 5ms, which has the higher crest factor? Square => 3/3 = 1.00 Sine => 2/(2/√2) = 1.414

5. (2pt) Sketch the approximate output signal if the input is a 2Vp-p square wave with of 10Hz frequency when the program runs using options S – 14 – 48/2. Sketch at least 2 complete cycles and scale both axes.

D.C. block (~100Hz) attenuates held signal!

III Binary Communications 2018 Name _________________________

1. (2pt) If it is possible, show how an error correcting code can switch between double error correcting and additional double error detection to single error correction and simultaneous 4-error detection without increasing the minimum hamming distance between codewords.

o = codeword, C = corrected bit, d = detected bit erroro C C d d C C o Correct 2, detect 2 more bit errorso C d d d d C o Correct 1, detect 4 more bit errors

2a. (2pt) A (7,4) Hamming code adds a parity bit to the end of the codeword to guarantee the modified code has even parity. What is the efficiency of the new code??

4/8 = 50%

2b (2pt) How would the bit rate need to be modified to match the original information bit rate of the (7,4) code?

message rate (7,4)/message rate (8,4) => (4/7)/(4/8) = 8/7 Rate must be 8/7x faster

3. (5pt) For a channel with 0.1Vrms of white noise, what minimum duty Cycle would be required for a ±3V pulse if the desired SNR must be at least 20dB?

D.C. => Vrms = 3√(D.C.)

20 log 3 √D .C .0.1

=20dB=¿ log 3√D.C .0.1

=1=¿ 3√D.C .0.1

=10=¿3√D.C .=1=¿D.C .=19=11.1%

4a. (5pt) Show the Venn diagram of Hamming code for a Hamming code using the following configuration: m1 m2 m3 m4 c1 c2 c3 with c1 based on message bits 1, 2, & 3, c2 based on message bits 1, 3, & 4, and c3

is based on message bits 2, 3, and 4.

4b. (2pt) The received word for this Hamming code was 1010100. What was the transmitted word?

Problem: m1 m2 m3 & c1 or m2 m3 m4 & c3 => must be m2 since m3 OK error is only in m2: 1110100

5. (2pt) A channel using only the In-phase component encodes 1 bit to ±2V amplitude signals. If a 90° Quadrature component is added that maintains the same minimum amplitude separation from either of the 2 In-phase signals, what amplitude is required?

Current separation on real-axis = 4V. Amplitude on imaginary axis must be ±2√3

c1

m1 m2 m3

m4

2√34

4

IV Digital Filter 2018 Name _________________________

1. (2pt) If a faster rolloff to the stopband is desired, which parameter may be adjusted to keep the order of the filter unchanged (indicate all that apply):a) Increase stopband attenuation b) Decrease stopband attenuation c) Increase fs d) Decrease fs e) none of these

2a. (4pt) Draw and label the pole-zero plots for 2 filters, BPF & BSF, with poles only on the x- or y-axis and zeros only on the x- or y- axis. Filters should be out of the 4 types: Butterworth, Chebyshev I or II, or Elliptic.

BPF BSP

2b. (2pt) What are the orders of the filters in 2a?both 2nd order

2c. (2pt) Which of the 4 types are the filters in 2a?

Can be any of the 4: Butterworth, Chebyshev I, Chebyshev II, or Elliptic (all the same for 2nd order)

2d. (1pt) If the sampling period is 20µs, what is the center frequency of the passband and stopband of the filters in 2a??

1/(4 x 0.00002) = 12.5kHz for both

3a. (4pt) Given two 8th order elliptic filters whose fs = 36kHz, which filter will have more ringing in its impulse response, a HPF with a passband at 3kHz or a BPF with a passband from 3kHz to 4kHz.

BPF will ring more (closer to an oscillator!)

3b. (5pt) . Use the impulse invariant transformation with T = 0.1 seconds to find H(z).

V Interactive Graphics 2018 Name _________________________

1a. (2pt) Given a phase lead compensator or a phase lag compensator, which reduces the steady-state error, and why?

Lag compensator due to its similarity to an integrator.

1b. (1pt) Given a phase lead compensator or a phase lag compensator, which increases a system’s rise time

Lag compensator

2. (5pt) Two compensators (negative feedback) have been implemented in MATLAB for G(s) as in the lab

procedure for the DC Motor compensator design, part c). They are G1( s )=

0 .1( s+1 )(s+2) and

G2( s )=0 .1( s+1 )(s+20) . Which one

would you expect to have a better response in terms of less overshoot, less oscillation, and a shorter settling time?

G2(s) is better: Poles farther from the origin, Faster response, More damping

3. (3pt) TRUE or FALSE: It is possible for the root locus of a combined phase lead compensator and a double pole DC motor to have 2 or more intersection branches (splits off the real axis).

4a. (6pt) Given 3 Gaussian pdfs with parameters below and with equal costs and a priori probabilities, sketch the decision boundaries in a single plane, showing each function’s standard deviation contour.

x y x0 y0

f1(x,y) 2 2 0 -4 0f2(x,y) 4 2 0 0 0f3(x,y) 2 2 0 +4 0

4b. (3pt) Which parameter or parameters in the specifications in 4a. must change to have the plane divided into 3 regions (one for each function)? Find the solution with the least number of parameters changed.

x = 2 (or less) in f2(x,y)

Solution to 2. above.

VI Hybrid Control 2018 Name _________________________

ANSWER ANY COMBINATION OF FULL QUESTIONS THAT ADD UP TO 20 POINTS.

1a. (3pt) For a type 0 plant with unity gain how much steady-state error is introduced by a pure proportional feedaback with Kp = 5?

ess = 1/(1+Kp) = 1/(1+5) = 1/6 = 16.6%

1b. (2pt) To what must Kp be increased to reduce the error to less than 5%?

ess = 1/(1+Kp) = 0.05 => 1 + Kp = 20, Kp = 19

2. (5pt) Find the characteristic equation for the controlled system below in terms of the gains gi.

s2 + (g5 + g2g7)s + (g6 + g2g8) = 0

3. (5pt) Considering the feedback response plot below, explain controller signal swings above & below the average values. Is there anything else noteworthy in the behavior in the control signal?

The KD is amplifying the noise on the output signal (±1b). The controller output is being clipped at 10V.

y(t)

r(t) u(t)

4a. (3pt) TRUE or FALSE: Both an ideal ripple free (FST) and ideal minimal prototype controller on a 2nd order system guarantee no continuous error after the second sampling interval.

FALSE: minimal prototype has no error only at the sample points

4b. (2pt) Which parameter or factor in a PID controller of a type 0 system will introduce a steady-state error between the input and output when the feedback controller is applied?i) KP ii) KI iii) KD iv) the presence of a free integrator in series with the plant Gp(s)

Kp introduces a steady-state error (position error constant)

5. (5pt) A PI Ziegler-Nichols controller for a process has Kp = 0.2 and Ki = 0.01. Find R and L for the plant’s step response and find the value of Kp for a purely proportional Ziegler-Nichols P controller.

KI = 0.3KP/L => L = 0.3KP/ KI = 0.3(.2)/0.01 = 6KP = 0.9/RL => R = 0.9/ KP L = 0.9/(0.2 x 6) = 0.75

Pure Proportional: KP = 1/RL = 1/(0.75 x 6) = 1/4.5 = 0.2222

6. (5pt) SET UP the equations to find the discrete matrices Ad, Bd, Cd, and Dd for a discrete pole-placement

controller given: Ac=[ 0 1 00 0 1

−3 −9 −7 ] ,B c=[104 ] ,Cc= [0.5 −1 2 ] , Dc=[ 10 ], and T = 0.01

Ad=eAcT=e

[ 0 0.01 00 0 0.01

−0.03 −0.09 −0.07]=L−1 {(sI−[ 0 1 00 0 1

−3 −9 −7])−1

}t=0.01

Bd=( Ad−I ) ( A c )−1B c=(e[

0 0.01 00 0 0.01

−0.03 −0.09 −0.07]−[1 0 00 1 00 0 1 ]) [ 0 1 0

0 0 1−3 −9 −7]

−1

[104 ]Cd= [0.5 −1 2 ] , Dcd=[ 10 ]

VII DC Motor Control 2010 Name _________________________

1. (5pt) Show that , > 1, has Bode plot properties very similar to a phase lead compensator and calculate the maximum gain when = 3.

2. (5pt) Find the position error constant and the error velocity constant for the plant and

compensator with negative unity feedback when the input is a unit step and unit ramp

G(s) = Gc(s)Gp(s) is a Type 0 system (no free integrator) so Kv = 0 (or undefined)Kp = G(0) = (7)(11)(2)/(-8)(10) = -77/40 = -1.925

3. (7pt) Find the sampling time T that will produce the digital controller Gc (z)=28 z−124.4 z+0.4 obtained from the

analog controller using the Tustin approximation.

Gc (s )=10 s+40s+12

@s=2(z−1)T (z+1)

Gc (z )=10 s 2( z−1)

T (z+1)+40

2(z−1)T (z+1)

+12=

20 ( z−1 )+40T (z+1)2 ( z−1 )+12T (z+1)

=( 40T +20 ) z+(40T−20)

(12T+2 ) z+(12T−2)= 28 z−12

4.4 z+0.4

12T – 2 = 0.4 => 12T = 2.4 => T = 0.2

4. (3pt) What is the settling time for a controlled system with G (s )= 10s2+10 s+25

?

G (s )= 10s2+10 s+25

= 10s2+2 ζ ωn s+ωn

2

ωn=5 , ζ=1

T s=4ζ ωn

= 4(1)(5)

=45=0.8 seconds

Lead compensator has a Bode plot with flat gain = 1 for small s that rises to a flat gain of for s > z.

Lead compensator phase starts a 0° for small s, increases to a maximum arcsin{(-1)(+1)} at s = z, and returns to 0°

See example plot for = 3. Gain = 3 2 = 9 = 19dB

VIII Optimal Control 2018 Name _________________________

1a. (4pt) For a 2nd order system with Ac=[ 0 1

−3 −5 ] ,Bc=[02 ] ,Cc=[1 2 ] , Dc=0 ,Q=[5 00 10 ] , R=4

and whose gain matrix for the LQR is G = [-0.5 -1], what must the p21 and p22 values be in the solution to the Riccati equation?

G=-R−1BT P=−14

[ 0 2 ] [p11 p12

p21 p22 ][−0 .5 −1 ]=[−1

4 (2 p21)−14 (2 p22) ]

p21=1 p22=2

1b. (1pt) Will the values of p11 and p12 have any effect on the feedback gains?NO

1c. (1pt) If all the same matrices were used in a discrete system, would the P matrix have the same values?NO

2. (8pt). Given x (k+1 )=- 12 x (k )+u(k ) and

J (u( k ) , x ( k ) , k )=12 H+ 1

2 ∑k=0

¥

{5x2 (k )+3u2 (k )}, find P used to

determine the feedback gain(s) but don’t find the gain(s). Assume there is no terminal state penalty.

A=- 12 , B=1 ,Q=5 ,R=3 , H=0

P=Q+A2

P−1+B2R−1 =5+(−1

2 )2

P−1+12 3−1 =5+14

P−1+13

=5+P4

1+P3

P−5=34 P3+P

(P−5 )(P+3)=34P

P2−114 P−15=0⇒P=

114 ±√11

42+4⋅15

2=11

8 ±√10818

P=+ 5 .485 ,−2 .735 Pick the positive definite value +5 .485

3. (4pt) What are the required characteristics of the P matrix for the solution to the continuous Riccati equation?

Constant elementsSymmetricRealPositive Definite

4. (2pt) Given the continuous performance index J and the A, B, Q, R, and H matrices, what assumptions are made about the limits of the integral term and the terminal state penalty matrix in finding a solution for P in the differential Riccati equation?

H = 0 and tf =