联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Python编程Python编程

日期:2018-11-04 09:41

1. True or false. For each part, specify whether the statement is true or false. Do not give

any explanation, proofs, or counterexamples; we will grade any question as incorrect

if it contains any explanation.

(a) If Q has orthonormal columns then kQTwk kwk for all w.

(b) Suppose A 2 Rmp and B 2 Rmq. If N (A) = {0} and R(A) R(B) then

p q.

(c) If V =V1 V2

is invertible and R(V1) = N (A), then N (AV2) = {0}.

(d) rank([A B]) = rank(A) = rank(B) =) R(A) = R(B).

(e) x 2 N (AT ) () x /2 R(A).

(f) If A is invertible, then AB is not full rank if and only if B is not full rank.

(g) A is not full rank ) there is an x 6= 0, such that Ax = 0.

3

3. Coin collector robot. Consider a robot with unit mass which can move in a frictionless

two dimensional plane. The robot has a constant unit speed in the y direction (towards

north), and it is designed such that we can only apply force in the x direction. We will

apply a force at time t given by fj for 2j

2 t < 2j where j = 1,...,n, so that the

applied force is constant over time intervals of length 2.

There are 2n coins in the plane and the goal is to design a sequence of input forces

for the robot to collect the maximum possible number of coins. The robot is designed

such that it can collect the ith coin only if it exactly passes through the location of

the coin (xi, yi). In this problem, we assume that yi = i.

(a) Find the coordinates of the robot at time t, where t is a positive integer. Your

answer should be a function of t and the vector of input forces f 2 Rn.

(b) Given a sequence of k coins (x1, y1),...,(x2n, y2n), describe a method to find

whether the robot can collect them.

(c) For the data provided in robot_coin_collector.m, show that the robot cannot

collect all the coins.

(d) Now assume that we know there exists a sequence of forces that can collect all

coins but one. Describe a method to find out which 2n

1 coins it can collect

and also find the associated input.

(e) Run your method on data in robot_coin_collector.m and report which coin

cannot be collected. Report the input that results in collecting 2n1

coins. Plot

the location of the coins and the location of the robot at integer times.

5

4. Power generation for a city. A city has a series of generators that provide power to

several key sites. Each site submits an estimate of the amount of power it plans to use

for the year. Certain generators are more ecient

for providing power to some of the

sites than others. The following table provides a list of the generators and the amount

of power it can generate per unit cost for each site.

Generator 1 Generator 2 Generator 3 Generator 4

Site A 5210

Site B 1123

Site C 0124

Site D 0331

Site E 3211

Site F 2031

Site G 1302

Here is the amount of power each site estimates it will use for the year:

Site A Site B Site C Site D Site E Site F Site G

20 5 3 4 10 5 5

The goal is to estimate how much money will be spent at each generator while trying

to meet the sites’ estimates. There is one requirement, however. Site A, a hospital, has

been given top priority, and therefore must receive the exact amount of power it has

requested. The other sites are allowed to receive a little more or less than the power

it requested, though the goal is still to get as close as possible to meeting every site’s

request.

To avoid typos, the generator table and site requirements can be found at powerGen.m.

Here is what we want you to answer. Be sure to explain your process and how you

arrived at your answer.

(a) Find the vector of money spent for each generator that minimizes the sum of

the squared deviation between the sites’ power requested and power generated,

provided that Site A receives its exact estimate.

(b) Generator 4 has stopped working. Find the tradeo? curve showing how close the

other sites can get to their estimates as the requirement for Site A is relaxed. Plot

the sum of the squared deviation of what Sites B through G request and receive

versus the di?erence squared between what Site A requests and what it receives.

6

5. Estimating the channel. In a communications channel, the input x1,...,xN and output

y1,...,yN are related by the following equation:

yn = X

M

m=1

hmxnm+1

+ vn for n = 1,...,N,

where h1,...,hM is the impulse response of the channel and v1,...,vN is some noise

term. In order to estimate the impulse response of the channel, it is typical to send a

known input sequence through the channel, and from the output deduce the channel

coecients.

Our task is to estimate the channel which minimizes the following objective function:

Assume that xn = 0 for n ? 0.

One thing that we have left out is the length of the impulse response. We can get

around this problem by iterating over the lengths of the channel and observing how

the residual behaves.

There are three parts to this question:

(a) Using the data provided in channel.m, find the impulse response of the channel

assuming the length of the impulse response is 4. The known input and output

signals are stored in the variables x_known and y_known, respectively. Explain

how you arrived at those coecients.

(b) Iterate your solution from part (a) assuming the length of the impulse response is

3,..., 10 and give the corresponding residuals. Plot the residual J as a function

of the impulse response length. Is 4 a reasonable estimate? What would you

recommend as a good length for the impulse response?

(c) You receive more output from the channel (stored in the variable y_unknown),

except now you don’t know what the input signal is. yn runs from n = 1,...,N +

10, although xn = 0 for n>N. Using the channel you found in part (b), find

and make a stem plot (using Matlab’s stem command) of your estimated signal

xn for n = 1,...,N. Also report the residual.

7

6. Heating lamp power control. Heating process is a usually critical process in chemical

synthesis. A heating chamber usually consists of several lamps for heating and several

temperature sensors (for example, thermocouples) for monitoring. It is often required

that the temperature increase rate is constant, but unfortunately, in reality, the temperature

increase rate is a nonlinear function with lamp powers, current temperature

distribution, and the position of lamps, etc.

To achieve active lamp power control, we could

(a) solve heating transfer di?erential equations to get the nonlinear relationship between

the temperature increase rate and lamp powers and current temperature

profiles. But due to the environment’s fluctuations and the time consuming of

solving PDE problems, this method usually does not work well.

(b) Assume the relationship between temperature increase rate and lamp powers and

current temperature is linear in a small time and temperature interval. Then we

can solve the dynamics of the smaller scale linear system very fast and use the

dynamics to generate next power outputs, based on target temperature increase

profile.

Now we consider a even simpler model: the temperature increase rate of each sensors

is a linear function of the lamp powers all the time.

Here is the problem. In a heating system in 2D space, there are 3 lamps located in

di?erent positions and there are 4 thermocouples to monitor the temperature in the

heating area. We already took the temperature measurement and recorded lamp power

outputs.

You are given these records

p(1),...,p(N), T(1),...,T(N),

where p(t) 2 R3, are the power outputs of the 3 lamps, and T 2 R4 are the measured

temperatures from the 4 thermocouples.

Now we assume at each discrete time t,

T(t)

T(t

1) = A(t)p(t).

Where the matrix A(t) 2 R4?3 is the parameter matrix of the model. Since now we

are considering the simplest model, we assume all A(t) are the same, so we have

T(t)

T(t1)Ap(t).

The method works by choosing A that minimizes the RMS (root-mean-square) of the

prediction error over t = 2, 3,...,N . In another words, we want to choose the matrix A

to minimize

8

(a) Explain how to obtain A, given the records T(t) and p(t).

(b) Implement the method, and apply it to the data given in the file

temp_control_data.m. This file contains a temperature record matrix

T =

T(1) T(2) ... T(N)

and a power supply record matrix

p =p(1) p(2) ... p(N)

Find the matrix A which minimizes the RMS of the prediction error, and compute

the RMS prediction error.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp