This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
CHAPTER 9
Problem 9.2-1:
(a) An appropriate reference model:
(b) An appropriate linear feedback:
The single gain parameter K here could be different value that used for the
reference model.
(c) A nominal dynamic inverse:
Problem 9.2-2: Implemented in MATLAB in a manner similar to Example 9.3-1:
oldrdot = rdot;
end;
figure(1)
subplot(2,1,1)
grid;
Problem 9.2-3: Implemented in MATLAB in a manner similar to Example 9.3-1:
% parameter choices
dt = 0.05; tfinal = 10;
for i=1:points,
t(i)=(i-1)*dt;
% reference model
r(i+1,:) = r(i,:) + ( 1.5*rdot - 0.5*oldrdot )*dt;
end;
oldxdot = xdot;
oldrdot = rdot;
end;
figure(1)
Problem 9.2-4: First, solve for input u:
Then, replace 𝑥̈ with a desired pseudo-control.
Problem 9.2-5: We have
Using our pseudo-control input and regrouping:
This is an underdetermined problem, where we have single input and effectively
two equations that need to be satisfied. One possibility would be optimize our
input to achieve the smallest possible square error of the two equations. For the
specific case where we chose to completely prioritize a match of 𝑣𝑞̇= 𝑄̇, the case
for pitch attitude control tasks, then the solution would be:
Problem 9.3-1: MATLAB script that implements this is presented here:
% generate traning set
x_train = sort(rand(100,1)*pi - pi/2);
f_train = sin(x_train);
% parameter choices
% precompute activation potentials
% preallocate arrays
% get weights from state vector
% put NN update in a vector
wdot = Wdot;
for j=1:nmid,
vdot((j-1)*nin+1:j*nin) = Vdot(j,:);
end;
The results for 200 iterations on the training set of 100 values:
Problem 9.3-2:
(a) Outer layer learning rate Γ𝑊: When too large, high frequency oscillations
occurred. When too low, training was very slow. 0.7 seemed to be a slight
improvement of unity.
Problem 9.3-3: MATLAB script of implementation:
% precompute activation potentials
% preallocate arrays
points = tfinal/dt + 1;
t = zeros(points,1); r = zeros(points,2);
sig = zeros(nmid,1); sigp = zeros(nmid,nmid);
for i=1:points,
t(i)=(i-1)*dt;
ez = exp( -a(j)*vx(j) );
sig(j) = 1/( 1 + ez );
sigp(j,j) = a(j)*ez*sig(j)*sig(j);
for j=1:nmid,
vdot((j-1)*nin+1:j*nin) = Vdot(j,:);
figure(1)
subplot(3,1,1)
plot(t,[x(:,1) r(:,1)]);
xlabel('time');
ylabel('Theta (rad)');
legend('state','command');
grid;
Problem 9.4-1: If the desired pseudo-control signal results in driving one or more inputs
Problem 9.4-2: MATLAB script of implementation:
% preallocate arrays
Trusted by Thousands of
Students
Here are what students say about us.
Resources
Company
Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.