# can anyone help me to write matlab code

Status
Not open for further replies.

#### asd2010

##### Newbie level 1
dears;

iam looking for any one can help me to write a matlab code. in fact, my problem talking about startegic bidding in electricity markets. and i already wrote a code but it is not giving correct answers.

#### bigdogguru

If you upload your code, I'll take a look at it when I have time.

Also include a sample run with results and what you expected these results to be.

#### recoba1987

##### Newbie level 1
Hi all,

I am having some problems writing the script for the following question. It relates to Dynamics and Control (Mech. Engineering), and specifically to drawing Step-Response Curves. The question is from Modern Control Engineering, K Ogata, 3rd edition, Problem B-4-3 of the Textbook.

“Consider the system shown in Figure (a) of next page. The damping ratio of this system is 0.158 and the undamped natural frequency is 3.16 rad/sec. To improve the relative stability, we employ tachometer feedback. Figure (b) shows such a tachometer-feedback system.
Determine the value of Kh so that the damping ratio of the system is 0.5. Draw unit-step response curves of both the original and tachometer-feedback systems. Also draw the error-versus-time curves for the unit-ramp response of both systems.”

I have attached the function below, as I cannot paste the diagram here…

“G(s) = 10/{s(s+1)}
C1(s)/R(s) = 10/(s^2 + s + 10)
C1(s) = 10/s{s^2 + s + 10)
Damping Ratio = 0.158
Undamped Natural Frequency = 3.16 rad/s
peak Time = 1.00sec
settling time = 8.00 sec
Max. Overshoot = 0.60

If anyone can show me how to draw the graphs for part (a) (without the tachometer), it will be greatly appreciated. As you can tell, I am very raw and new to MATLAB, and need to learn this fast. Thanks in advance! =)

Status
Not open for further replies.