## Transcribed Text

Application Example Homework Assignment – Part B
1. It is desired to regulate actual WIP wipa by adjusting full capacity at instants in time
separated by a period of T days. At each sample instant kT, wipa(kT) is sampled, the next
capacity adjustment is calculated, and the result then is implemented after a delay of D days;
assume that D is an integer multiple of T.
For the operating domain wipa ³ wipideal, draw a block diagram in which wipa(t) is sampled to
obtain wipa(kT) and cc(kT) is held to obtain cc(t) (using a zero-order hold). To facilitate
discrete analysis, assume that capacity and work disturbances only occur at the sample
instants. To include this assumption in the block diagram, insert fictitious input cd(kT)
followed by a fictitious zero-order hold to obtain cd(t), and insert fictitious input wd(kT)
followed by a fictitious zero-order hold to obtain wd(t).
The equations that describe the continuous portions of the closed-loop system in Figure 2 are
���'(�) = �,(�) + �.(�) − �0(�)
�"(�) = �4(�) − �.(�)
.7#(8)
.8 = �'(�)
The equations that describe the discrete portions of the closed-loop system in Figure 2 are
���2(��) = ���'(��) − ���3(��)
� = <
=
where d is an integer
�4(��) = �3((� − �)�) + �4���((� − �)�)
2. For the operating domain wipa ³ wipideal, calculate the following discrete closed-loop transfer
functions (you must show your work):
WIPa(z)/Wd(z)
Cc(z)/Wd(z)
First, obtain the transformed discrete equation that relates �"
J
(�) to ���'(�). Assume inputs
WIPp(z) and Cp(z) are zero because the transfer functions are to be found only for input
Wd(z).
Next, obtain the transformed continuous equation that relates WIPa(s) to Wd(s) and Cf(s),
assuming inputs Wi(s) and Cd(s) are zero. Then, refer to the discrete models that are
developed in the lecture “Discrete Transfer Functions and Block Diagrams” and obtain the
corresponding transformed discrete equation that relates WIPa(z) to Wd(z) and Cc(z). This
result and the equation for Cc(z) then can be combined, and the individual transfer functions
then can be obtained.
6
3. For the operating domain wipa ³ wipideal, calculate the discrete closed-loop characteristic
equation.
4. For the operating domain wipa ³ wipideal, write a Matlab script that plots the closed-loop
response ∆wipa(kT) and ∆cc(kT) to a step work disturbance wd(kT) of 1 hour; such a
disturbance could be due to a rush order.
The transfer functions that were calculated above can be used (directly substitute ∆wipa(kT)
for wipa(kT) and ∆cc(kT) for cc(kT)) with the ‘step’ function in the Matlab script to plot
∆wipa(kT) and ∆cc(kT). This is convenient and is possible because of the superposition
property of linear system models (responses to components of system variables and
responses to several inputs can be added together to obtain their combined effect), wipa(kT)
and cc(kT) can be separated into the following components:
���'(��) = ���'# + ∆���'(��)
�4(��) = �"# + ∆�4(��)
where ���'# and �"# are the constant values of actual WIP and full capacity before the step
disturbance occurs. Use the following system parameters and repeat for Kc = 0.1, 0.25, 0.5, 1
day-1
:
T = 1 day
D = 1 day
Submit your script and plots.
5. For each of the values of Kc, calculate the damping ratio and time constant using the ‘damp’
function. Relate the results to the step responses.
6. (optional, not graded) Repeat the step response calculation problem above for Kc=0.25 day-1
,
except use the superposition property of linear system models to calculate and plot the
response wipa(kT) and cc(kT) instead of ∆wipa(kT) and ∆cc(kT). Add the following values of
���'# and �"# to the results before plotting:
���3 = ���'# = 200 h
�3 = �"# = ��,(�)
�� = 35 h/day
Use the ‘step’ function option that places the response data in vectors instead of plotting the
response. To reflect the discrete nature of this system, use ‘stairs’ instead of ‘plot’ in your
script.
Submit your script and plots.

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.

clc;

clear all;

Kc = [0.1 0.25 0.5 1];

T = 1;

D = 1;

d = D/T;

for i = 1:length(Kc)

G1(i) = tf([1 -1 0],[1 -1 Kc(i)*T],T,'TimeUnit','days');

G2(i) = tf(Kc(i)*[1 -1 0],[1 -1 Kc(i)*T 0],T,'TimeUnit','days');

end

figure;

subplot(2,2,1);step(G1(1));title('WIP for K_{c}=0.1');ylabel('Hours');

subplot(2,2,2);step(G1(2));title('WIP for K_{c}=0.25');ylabel('Hours');

subplot(2,2,3);step(G1(3));title('WIP for K_{c}=0.5');ylabel('Hours');

subplot(2,2,4);step(G1(4));title('WIP for K_{c}=0.5');ylabel('Hours');

figure;

subplot(2,2,1);step(G2(1));title('Capacity for K_{c}=0.1');ylabel('Hours/day');

subplot(2,2,2);step(G2(2));title('Capacity for K_{c}=0.25');ylabel('Hours/day');

subplot(2,2,3);step(G2(3));title('Capacity for K_{c}=0.5');ylabel('Hours/day');

subplot(2,2,4);step(G2(4));title('Capacity for K_{c}=0.5');;ylabel('Hours/day');

%%%%%%%

for i = 1:4

[w,zeta] = damp(G1(i));

fprintf('The Damping Ratio in the case of WIP with K_{c} = %f is %f\n',Kc(i),max([w,zeta] = damp(G2(i));

fprintf('The Damping Ratio in the case of Capacity with K_{c} = %f is %f\n',Kc(end

%%%%%%%

Kc = 0.25;

G1 = tf([1 -1...