• 5星
403KB alongiii 2021-01-04 10:40:20
• 5星
11KB weixin_42696333 2021-09-10 20:59:17
• 5星
1KB weixin_47505475 2021-04-11 17:43:30
• 430KB weixin_42665725 2021-09-29 12:59:49
• 1.5MB qq_42799900 2021-09-30 17:57:40
• MATLAB大作业 MATLAB 刘卫国

980KB weixin_42599943 2018-11-28 17:57:33
• 优化设计Matlab编程作业.pdf 技术

539KB yankunyun 2021-10-13 16:04:08
• MATLAB编程作业[整理].pdf 软件开发

1.51MB xhr131452007 2021-10-11 04:37:22
• 21.28MB rfhjty 2018-10-14 13:02:40
• 5星
92KB m0_52957036 2020-11-05 11:05:15
• matlab作业更新时间：2017/2/23 14:40:00浏览量：560手机版MATLAB语言、控制系统分析与设计大作业平衡杆小球位置控制系统设计与仿真专 业：电气工程及其自动化 班 级： 设 计 者： 学 号：华中科技大学电气与电子...

matlab大作业

更新时间：2017/2/23 14:40:00  浏览量：560  手机版

MATLAB语言、控制系统分析与设计

大作业

平衡杆小球位置控制系统

设计与仿真

专 业：电气工程及其自动化 班 级： 设 计 者： 学 号：

华中科技大学电气与电子工程学院

2008年1月

平衡杆小球位置控制系统设计与仿真

一、问题描述与实验要求

A ball is placed on a beam, see figure below, where it is allowed to roll with 1 degree of freedom along the length of the beam. A lever arm is attached to the beam at one end and a servo gear at the other. As the servo gear turns by an angle theta, the lever changes the angle of the beam by alpha. When the angle is changed from the vertical position, gravity causes the ball to roll along the beam. A controller will be designed for

this system so that the ball's position can be manipulated.

For this problem, we will assume that the ball rolls without slipping and friction between the beam and ball is negligible. The constants and variables for this example are defined as follows:

M R D G L J R Alpha

mass of the ball radius of the ball lever arm offset gravitational acceleration length of the beam ball's moment of inertia ball position coordinate beam angle coordinate

0.11 kg 0.015 m 0.03 m 9.8 m/s^2 1.0 m

9.99e-6 kgm^2

Theta servo gear angle

System Equations

The Lagrangian equation of motion for the ball is given by the

following:

Linearization of this equation about the beam angle, alpha = 0, gives us

the following linear approximation of the system:

The equation which relates the beam angle to the angle of the gear can

be approximated as linear by the equation below:

Substituting this into the previous equation, we get:

Design requirements

The design criteria for this problem are: Settling time less than 3 seconds ? Overshoot less than 5%

?

1．数学模型的建立

将上面推导的简化式做拉普拉斯变换，得到： 变化后得到：

R(s)

mg

??

(JR

2

(

JR

2

?m)Rs(s)??mg

2

dL

?s( )

d2

?(s)

?m)s

化简为：

R(s)

??

mgdR

22

2

?(s)(J?mR)ls

2．设计目标

希望能精确小球的位置，即要求小球的稳态误差为零，同时希望因扰动引起的稳态误差也能为零。对于动态性能的要求，希望小球能较快且平稳，期望调节时间Ts为3s，超调量小于5%。根据时域和频域指标的关系，可将时域性能指标转换为频率响应的约束条件。如系统的带宽与闭环系统自然振荡频率?n和阻尼比?有关，而??n与调节时间有关。相角裕度PM和阻尼比?有关，进而与超调量相关。

?bw??n

?

?1?2???

2

4?

4

?4?

4

2

?2

2

4TS?

?1?2???

2

4??4??2

(1-4)

zeta = -log(.05)/sqrt(pi^2+(log(.05))^2);

PM = 100*zeta;

wbw = (4/(3*zeta))*sqrt((1-2*zeta^2)+sqrt(4*zeta^4-4*zeta^2+2));

得 ?> 0.6901，PM> 69.0107 deg，wbw> 1.9785 rad/sec

3．开环响应

首先用MATLAB描述上述模型，并观察开环系统阶跃响应。

R(s)

?(s)

?

mgdR

2

2

2

(J?mR)ls

J=9.99e-6; m=0.11; R=0.015; g=9.8; d=0.03; l=1.0;

num=m*g*d*R*R;

den=[(J+m*R*R)*l 0 0]; ball=tf(num,den)

展开全文 weixin_39838362 2021-04-18 16:45:36
• 28.96MB jerk_zhu 2019-03-08 15:51:52
• matlab程序作业[文].pdf 软件开发

13KB xhr131452007 2021-10-11 04:36:43
• MAT 128B作业代做、Matlab编程作业调试、代写Matlab课程设计作业、代做Programming作业 matlab编程代做

MAT 128B作业代做、Matlab编程作业调试、代写Matlab课程设计作业、代做Programming作业日期：2019-01-27 10:35MAT 128B, Winter 2019Programming Project 1(due by Wednesday, January 30, 11:59 pm)General ...

MAT 128B作业代做、Matlab编程作业调试、代写Matlab课程设计作业、代做Programming作业

日期：2019-01-27 10:35

MAT 128B, Winter 2019

Programming Project 1

(due by Wednesday, January 30, 11:59 pm)

General Instructions

You are required to submit each of your programming projects via file upload to Canvas.

Note that the due dates set in Canvas are hard deadlines. I will not accept any submissions

outside of Canvas or after the deadline.

Write a report that includes all required numerical results, a discussion of your results, and

explanations of runs for which a method failed. Your report should be at least one page long,

but not longer than three pages.

When you are asked to print out numerical results, print numbers in 16-digit floating-point format.

You can use the Matlab command “format long e” to switch to that format from Matlab’s

default. For example, the number 10π would be printed out as 3.141592653589793e+01

in 16-digit floating-point format.

For each programming project, upload these files: a single pdf file of your report and a

complete set of Matlab files that lets us run and check your programs. This set should consist

of one file for each Matlab function you are asked to write and a single driver file for each

of the problems that you are asked to test your programs on. Each of these driver files

should generate the required numerical results for all runs of a problem. So for this current

project, you should submit a total of 7 Matlab files: 4 files for the functions FPI, NEWTON,

DAMPED NEWTON, and SECANT and three driver files for Problems 1–3.

We consider the problem of computing solutions of nonlinear equations

f(x) = 0, (1)

where f : R 7→ R is a continuous function. A solution x of (1) is called a root of f. Newton’s

method, Newton’s method with damping, and the secant method are root-finding procedures that

are applied directly to the function f. Fixed-point iteration is applied to a continuous function g

the fixed points of which are roots of f.

Write Matlab functions FPI, NEWTON, DAMPED NEWTON, and SECANT for carrying out the

versions of fixed-point iteration, Newton’s method, Newton’s method with damping, and the secant

method that were presented in class. For Newton’s method and Newton’s method with damping,

the function f is assumed to be continuously differentiable.

For all 4 functions, use the stopping criterion

|xi+1 ? xi

|

max{ |xi+1|, 1 }

< TOL.

Here, xi+1 and xi denotes the approximate root of f generated in the current iteration and previous

iteration, respectively. Make an effort to write your programs such that you use as few function

evaluations (of g, f, and f

0

) as possible.

The input parameters for FPI should be:

A Matlab function for evaluating the function g at any given x

The initial guess x0

The convergence tolerance TOL

The integer N0 to safeguard against infinite loops due to bugs or non-converging iterates

The input parameters for NEWTON should be:

A Matlab function for evaluating the function f at any given x

A Matlab function for evaluating the derivative f

0 at any given x

The initial guess x0

The convergence tolerance TOL

The integer N0 to safeguard against infinite loops due to bugs or non-converging iterates

The input parameters for DAMPED NEWTON should be:

A Matlab function for evaluating the function f at any given x

A Matlab function for evaluating the derivative f

0 at any given x

The initial guess x0

The convergence tolerance TOL

The integer N0 to safeguard against infinite loops due to bugs or non-converging iterates

A small λmin > 0 to safeguard against tiny λi

’s

The input parameters for SECANT should be:

A Matlab function for evaluating the function f at any given x

The initial guesses x0 and x1

The convergence tolerance TOL

The integer N0 to safeguard against infinite loops due to bugs or non-converging iterates

Use your functions to compute roots for the following three problems. For all your runs, use the

convergence tolerance

TOL = 10?15

and choose N0 large enough so that you can observe convergence or divergence. Use

λmin = 10?15

for your runs with DAMPED NEWTON.

Problem 1: Run NEWTON and SECANT to find a root of the function

f1(x) = 2x

Apply FPI to the function

the fixed point of which is the positive root of f1. Run both NEWTON and FPI with the three

initial guesses

Run SECANT with the three pairs of initial guesses

x0 = 0 and x1 = 1, x0 = 1 and x1 = 2,

Problem 2: Run NEWTON, DAMPED NEWTON, and SECANT to find a root of the function

f2(x) = arctan x

Apply FPI to the function

g2(x) = x

arctan x

the fixed points of which are the roots of f2. Run each of FPI, NEWTON, and DAMPED NEWTON

with the three initial guesses

x0 = 1, x0 = 2, x0 = 10,

for a total of 9 runs. Run SECANT with the three pairs of initial guesses

x0 = 1 and x1 = 2, x0 = 2 and x1 = 3, x0 = 10 and x1 = 11.

Problem 3: Run NEWTON, DAMPED NEWTON, and SECANT to find a root of the function

f3(x) = arctan x.

Run both NEWTON and DAMPED NEWTON with the 4 initial guesses

x0 = 1, x0 = 10, x0 = r ? 10?15, x0 = r + 10?15

,

where r denotes the value of the positive approximate root of f2 that you obtained from your run

of NEWTON with x0 = 1 in Problem 2. Run SECANT with the three pairs of initial guesses

x0 = 1 and x1 = 2, x0 = 10 and x1 = 11, x0 = r

For all your runs in Problems 1–3, print out the final value of xi+1 at termination, the corresponding

iteration index i, the total number of evaluations of the function f (or g in the case of FPI) used

in that run, and for NEWTON and DAMPED NEWTON, the total number of evaluations of the

derivative f0

. For all your runs, comment on the speed of convergence and possible divergence. If

there is divergence, provide an explanation for it.

展开全文 weixin_42309456 2021-04-21 18:25:17
• 汽车理论matlab编程作业答案 孙野 20081268 1 4.3(1)利用附着系数 空载时前轴的利用附着系数 ： ???? ????1 ???? ????1 = ???????? 1 ???? ( ???? + ???? ℎ ???? ) = 0.38???? 1 3.95 (1.85+ 0.845???? ) 空载时... 汽车理论matlab编程作业答案

孙野 20081268 1 4.3(1)利用附着系数 空载时前轴的利用附着系数 ： 𝜑 𝑓1 𝜑 𝑓1 = 𝛽𝑧 1 𝐿 ( 𝑏 + 𝑧 ℎ 𝑔 ) = 0.38𝑧 1 3.95 (1.85+ 0.845𝑧 ) 空载时后轴的利用附着系数 ： 𝜑 𝑟1 𝜑 𝑟1 = (1 ‒ 𝛽)𝑧 1 𝐿 ( 𝑎 ‒ 𝑧 ℎ 𝑔 ) = (1 ‒ 0.38)𝑧 1 3.95 (2.1 ‒ 0.845𝑧 ) 满载时前轴的利用附着系数 ： 𝜑 𝑓2 𝜑 𝑓2 = 𝛽𝑧 1 𝐿 ( 𝑏 + 𝑧 ℎ 𝑔 ) = 0.38𝑧 1 3.95 (1.0+ 1.17𝑧 ) 满载时后轴的利用附着系数 ： 𝜑 𝑟2 Matlab程序： 𝜑 𝑟2 = (1 ‒ 𝛽)𝑧 1 𝐿 ( 𝑎 ‒ 𝑧 ℎ 𝑔 ) = (1 ‒ 0.38)𝑧 1 3.95 (2.95 ‒ 1.17𝑧 ) clc clear syms z; f1=0.38*z/((1/3.95)*(1.85+0.845*z)); r1=(1-0.38)*z/((1/3.95)*(2.1-0.845*z)); f2=0.38*z/((1/3.95)*(1.0+1.17*z)); r2=(1-0.38)*z/((1/3.95)*(2.95-1.17*z)); f=z; ezplot(f1); hold on; ezplot(f2); ezplot(r1); ezplot(r2); ezplot(f); axis([0 1.0 0 1.0]); title( 利用附着系数曲线 ); xlabel( 制动强度z ); ylabel( 利用附着系数 ); text(0.38,0.8, Ør(空载) ); text(0.6,0.9, Ør(满载) ); text(0.8,0.45, Øf(空载) ); text(0.8,0.6, Øf(满载) ); text(0.85,0.9, Ø=z )孙野 20081268 2 制动效率 空载时前轴的制动效率 ： 𝐸 𝑓1 𝐸 𝑓1 = 𝑏 𝐿 𝛽 ‒ 𝜑 𝑓 ℎ 𝑔 𝐿 = 1.85/3.95 0.38 ‒ 𝜑 𝑓 ∙0.845/3.95 空载时后轴的制动效率 ： 𝐸 𝑟1 𝐸 𝑟 1 = 𝑎 𝐿 (1 ‒ 𝛽) ‒ 𝜑 𝑟 ℎ 𝑔 𝐿 = 2.1/3.95 (1 ‒0.38) ‒ 𝜑 𝑟 ∙0.845/3.95 满载时前轴的制动效率 ： 𝐸 𝑓2 𝐸 𝑓 2 = 𝑏 𝐿 𝛽 ‒ 𝜑 𝑓 ℎ 𝑔 𝐿 = 1.0/3.95 0.38 ‒ 𝜑 𝑓 ∙1.17/3.95 满载时后轴的制动效率 ： 𝐸 𝑟2 𝐸 𝑟 2 = 𝑎 𝐿 (1 ‒ 𝛽) ‒ 𝜑 𝑟 ℎ 𝑔 𝐿 = 2.95/3.95 (1 ‒0.38) ‒ 𝜑 𝑟 ∙1.17/3.95 Matlab 程序： clear syms x; Er1=2.1/3.95/(1-0.38+x*0.845/3.95); Ef2=1.0/3.95/(0.38-x*1.17/3.95); Er2=2.95/3.95/(1-0.38+x*1.17/3.95); ezplot(Ef2);孙野 20081268 3 hold on; ezplot(Er1); ezplot(Er2); axis([0 1.0 0 1.0]); title( 前后轴制动效率曲线 ); xlabel( 附着系数 ); ylabel( 制动效率(%) ); text(0.35,0.9, Ef ); text(0.8,0.9, Er ); text(0.55,0.78, Er ); text(0.65,0.94, 满载 ); text(0.55,0.65, 空载 ); (2)①由图可得：空载时，在 φ=0.8时的制动效率为0.7，则其制动减速度为 0.8g*0.7=0.56g。 制动距离为： =6.57m max 2 0 0 2 2 92 . 25 2 6 . 3 1 b a a a u u s               g 56 . 0 92 . 25 30 30 2 02 . 0 02 . 0 6 . 3 1 2            ②由图可得：满载时，在φ=0.8时的制动效率为0.87，则其制动减速度为 0.8g*0.87=0.696g。 制动距离为： =5.34m max 2 0 0 2 2 92 . 25 2 6 . 3 1 b a a a u u s               g 696 . 0 92 . 25 30 30 2 02 . 0 02 . 0 6 . 3 1 2            (3)①若制动系前部管路损坏Gz dt du g G F xb   2 ) ( 2 g z zh a L G F  孙野 20081268 4 后轴利用附着系数 后轴制动效率 g r zh a Lz    L h L a z E g r r r / 1 /      代入数据得：空载时： =0.45 满载时： =0.60 r E r E a)空载时 其最大动减速度 g g a b 36 . 0 45 . 0 8 . 0 max    代入公式： =10.09m max 2 0 0 2 2 92 . 25 2 6 . 3 1 b a a a u u s               g 36 . 0 92 . 25 30 30 2 02 . 0 02 . 0 6 . 3 1 2            b)满载时 其最大动减速度 g g a b 48 . 0 6 . 0 8 . 0 max    代入公式： =7.63m max 2 0 0 2 2 92 . 25 2 6 . 3 1 b a a a u u s               g 48 . 0 92 . 25 30 30 2 02 . 0 02 . 0 6 . 3 1 2            B．若制动系后部管路损坏Gz dt du g G F xb   1 ) ( 1 g z zh b L G F   前轴利用附着系数 前轴制动效率 g f zh b Lz    L h L b z E g f f f / 1 /      代入数据： 空载时： =0.57 满载时： =0.33 f E f E a)空载时 其最大动减速度 g g a b 456 . 0 57 . 0 8 . 0 max    代入公式： =8.02m max 2 0 0 2 2 92 . 25 2 6 . 3 1 b a a a u u s          

展开全文 weixin_42516668 2021-04-19 08:48:12
• 95KB baidu_24393087 2014-12-26 13:02:48
• 4星
1.46MB yuebuchuleichi 2017-04-15 17:56:04

代写Canvas留学生作业、MatLab编程语言作业调试、MatLab实验作业代做、代写program课程作业

日期：2019-12-07 10:14

MatLab Take-Home Test

(Take-Home Tests, Strictly Individual, 50 Points)

This is a take-home test, meaning that you may use course-provided materials or outside references as study

aids. However, you may NOT copy solutions from the Internet or another student and submit them as

posted on Canvas as usual.

There are two problems in this assignment. The second problem uses an external data file. The data file can be

found on the Canvas home page, and is named as TravelingTrucks_Coordinates.csv. A version of this file with

SAVE YOUR FILES OFTEN – If MatLab crashes, you won’t lose all of your work.

HONOR PLEDGE:

I have neither given or received unauthorized aid on this assignment, including solutions to assignment problems

obtained from other students or the Internet. I will not share or make available in any way any information about

this assignment to anyone until after the graded assignment has been returned to me.

SIGNATURE: _______________________________________________________________________

Printed Name (Last, First):_____________________________________________________________

Problem 1

Part 1:

Create a MatLab script file funcVector_pid.m which accepts two vectors: names of marathon runners, and

their respective finish time from the user, and then outputs the name of the winner and his/her finish time. For

this problem, do not use loops. The user creates the names of the runners and their finishing times.

Hint: https://www.mathworks.com/help/matlab/ref/min.html

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Screen shot showing results

? Your .m file for the code.

Be sure to label all files with your PID, and NOT with your numeric ID.

Part 2:

Write a MATLAB script file named vectorPattern_pid.m that will:

1. create a vector for a variable A with value [-99 -98 -97 . . . . -1]

2. using the vector A, create a second vector B which has the same numbers as A at its even indexes, but

the numbers at odd index values are replaced by the value 0.

3. Starting from the index value 16, replace every 5th element of vector B with the value 100

4. Multiply each element of B with the value -3

5. Display only the 29th – 50th elements of B.

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Screen shot showing results

? Your .m file for the code.

Be sure to label all files with your PID, and NOT with your numeric ID.

Problem 2

A local manufacturing company wants to find out the total time it takes to

deliver its products to retail stores from its manufacturing plant. The company

has 2 delivery trucks for this purpose. Truck 1 can travel at a speed of 54

km/hr and truck 2 can travel at 28 km/hr. The trucks go from store to store

delivering the products and then the trucks return to the factory. All deliveries

The locations of the retail stores are given as a set of kilometers west/east and

north/south. For example, (0, -15) means that the truck is only moving south 15 km or (-10, 30) means that the

truck is moving west 10 km and north 30 km. The trucks depart from the factory at the same time and travel from

one store to another until they eventually return to the original starting point. Make sure to account for the distance

needed to travel back to the starting point/factory. Each coordinate set is the distance from a starting point to

a destination.

(Northwest)   (Northeast)

Southwest)   (Southeast)

Part 1:

Part 2:

Write a MATLAB script that does the following:

1. Reads in the data from TravelingTrucks_Coordinates.csv. The file will contain 4 columns:

a. Column 1: Truck 1 west/east

b. Column 2: Truck 1 north/south

c. Column 3: Truck 2 west/east

d. Column 4: Truck 2 north/south

2. Outputs to travelingtrucks.txt, the total distance and time covered by both trucks for the full trip, both

individually and combined. The distance value should be in kilometers and accurate to two decimal

places (e.g., 1.34 km). Make sure to account for the distance needed to travel back to the starting

point/factory. You might use fopen/fclose or writematrix to write your results to a file.

3. To the same txt file, outputs which truck arrives back to the factory first.

4. Generate a single plot showing the paths traveled by both trucks.

NOTE: you can use the Pythagorean theorem ( a2

+ b2

= c2.) to calculate the straight-line distance of a given

store from another location, such as the warehouse or another store.

Submit the following to the Canvas site for this test as follows:

? A pdf including:

o Listing of the code for your program

o Sample run (aka information in txt file)

o Screen shot of the plot

? Your .m file for the code.

? The .txt file containing your output.

Be sure to label all files with your PID, and NOT with your numeric ID.

Please see the next page for an example of the inputs and outputs for Problem 2 using different data.

Example Input and Output: DEMONSTRATION ONLY – NOT THE CORRECT SOLUTION TO

THIS PROBLEM

Truck 1 Speed: 40 km/hr

Truck 2 Speed: 70 km/hr

Sample Input for truck 1 Sample Input for truck 2

Sample Output

Total distance travelled by truck 1: 169.50 km

Total time travelled by truck 1: 4.24 hours

Total distance travelled by truck 2: 117.51 km

Total time travelled by truck 2: 1.68 hours

Total combined distance travelled by the trucks: 287.01 km

Total combined time travelled by the trucks: 5.92 hours

East/West North/South East/West North/South

0 0 0 0

20 0 -20 0

30 -15 -30 -15

15 40 -10 -10

-10 30 0 -30

-20 5 10 -10

0 0 0 0

展开全文 weixin_42469444 2021-04-30 05:55:41
• weixin_34544309 2021-04-19 08:49:04
• weixin_39605296 2021-04-19 03:53:27
• mslurm:将Matlab作业发送到运行SLURM调度程序的HPC群集的工具箱-matlab开发 matlab

48KB weixin_38633967 2021-05-28 16:04:54
• 北航有限元编程大作业(Matlab) matlab 元编程

weixin_39770626 2021-04-23 09:35:56
• matlab大作业源码.zip matlab

345KB qq_50502307 2021-03-15 19:13:27
• matlab编程代做,MAT 128B作业代做、Matlab编程作业调试、代写Matlab课程设计作业、代做Programming作业... matlab编程代做

weixin_39977586 2021-04-21 18:24:23
• 2KB qq_31591639 2017-11-04 13:54:52
• 代码代写matlab,代写maltab 编程作业、代写matlab程序设计作业、代写maltab 作业 代码代写matlab

weixin_29090917 2021-04-21 11:18:41
• weixin_39685697 2021-04-21 10:12:39
• weixin_28963585 2021-04-18 09:00:01
• 1.35MB cao330b5e041039 2016-02-06 18:07:19
• 72.08MB m0_37687753 2018-07-09 23:51:01
• weixin_39613712 2021-04-24 14:01:44
• weixin_34805308 2021-04-23 15:07:13
• 【Matlab作业】MATLAB程序设计 matlab

weixin_43470383 2021-10-19 22:09:01  ...

matlab编程作业 matlab 订阅