San Francisco State University School Of Engineering ENG 290
San Francisco State Universityschool Of Engineeringengr 290 02
Use the HELP browser to find out what the following functions do. Write a one-line note for each function describing what the function does a. sum b. var c. size d. poly e. sqrt
Use MATLAB in the calculator mode to compute the following a. (2/5)(2-x)à·(3xy2) for x=1.5, y=3 b. 2log(√2)+3e2 c. 54/43/2 d. sin(π/4)cos-1(π/4) e. (3+2.5/1.6)1.4(16e-1)
Note: Attempt this problem only after you have finished the previous two problems. The unit step response, c(t), of a second-order system (such as a simple RLC circuit in EE or a Mass-Spring-Dashpot system in CE and ME) is given by the expression c(t) = 1 – ) cos( ) ( f w x xw x - - - - t e n t n where ) ( tan x x f - - = Using (n = 5 rad/sec and (=0.5, compute the value of c(t) for t= 0.1 to 1 sec. in steps of 0.1 sec. Plot the response c(t) as a function of time.
Paper For Above instruction
The task involves both understanding basic MATLAB functions and performing computations related to system responses. Firstly, using MATLAB's HELP browser to explore functions like sum, var, size, poly, and sqrt is essential. These functions are fundamental in MATLAB:
- sum: Calculates the sum of array elements;
- var: Computes the variance of data points;
- size: Returns the dimensions of an array;
- poly: Finds the coefficients of a polynomial with given roots;
- sqrt: Calculates the square root of a number or array.
Next, the computation part requires applying MATLAB in command mode to evaluate expressions. For instance, calculating (2/5)(2−x) * (3xy2) involves substituting x=1.5 and y=3 and then executing the operations in MATLAB. Similarly, other expressions such as logarithmic, exponential, and trigonometric functions are to be evaluated. Carefully performing these calculations and recording command window operations will demonstrate MATLAB proficiency.
The final task concerns analyzing the step response c(t) of a second-order system. The given response involves multiple functions, including cosine, tangent, and exponential functions, with parameters n=5 rad/sec and damping factor ζ=0.5. Calculating c(t) for t ranging from 0.1 to 1 second in steps of 0.1 sec involves selecting time vector, computing the corresponding c(t) values, and plotting the response. The MATLAB commands for defining the time vector, computing the response, and plotting are critical to accurately visualize the system's behavior.
Paper For Above instruction
In this paper, we focus on understanding fundamental MATLAB functions and applying MATLAB programming to analyze the dynamic response of a second-order system. Mastering MATLAB's built-in functions such as sum, var, size, poly, and sqrt is crucial for efficient data manipulation and analysis. These functions serve as the building blocks for more complex calculations and modeling in engineering research and practice.
Using the MATLAB HELP browser allows users to explore detailed documentation for each function, improving their ability to utilize MATLAB for diverse computational tasks. For example, the sum function simplifies aggregation of dataset elements, while var measures variance, an indicator of data dispersion. The size function is essential in matrix operations, providing dimensions that guide matrix manipulations. The poly function helps determine polynomial coefficients from roots, which is useful in control system design and signal processing. The sqrt function computes square roots, frequently used in calculations involving energy, power, and Euclidean distances.
The computational portion begins by translating mathematical expressions into MATLAB command line syntax and executing them to derive numeric answers. For instance, calculating the expression (2/5)(2−x) * (3xy2) for x=1.5, y=3 involves defining variables and performing multiplication. Similarly, logarithmic evaluations, exponential functions, and trigonometric calculations are carried out in MATLAB. These exercises reinforce understanding of MATLAB syntax and numerical accuracy.
The most complex component involves simulating the step response of a second-order system, modeled by the given expression: c(t) = 1 − e−ζωnt [cos(ωdt) + (ζ/√(1−ζ2)) sin(ωdt)]. Here, ωn = 5 rad/sec, ζ=0.5, and ωd = ωn√(1−ζ2). Calculating c(t) for t from 0.1 to 1 second in 0.1 sec intervals involves defining a time vector, computing the damping coefficient, and then evaluating c(t) at each time point. Plotting these values provides a kinetic visualization of the system’s transient behavior, illustrating how oscillations diminish over time due to damping.
In conclusion, this assignment combines theoretical knowledge of MATLAB functions with practical skills in numerical computation and system analysis. It demonstrates the importance of understanding the mathematical models of physical systems and leveraging MATLAB's capabilities for simulation and visualization. Such exercises are fundamental for engineering students to develop proficiency in numerical methods and control system analysis.
References
- MathWorks. (2020). MATLAB documentation. Retrieved from https://www.mathworks.com/help/matlab/
- Nise, N. S. (2010). Control Systems Engineering (6th ed.). John Wiley & Sons.
- Ogata, K. (2010). Modern Control Engineering (5th ed.). Pearson.
- Stewart, J. (2015). Calculus: Early Transcendentals (8th ed.). Cengage Learning.
- Kuo, B. C. (2004). Automatic Control Systems. Wiley.
- Chen, C. T. (1999). System and Signal Analysis. World Scientific.
- Barrett, R. (2018). MATLAB for Engineers: Applications and Controls. McGraw-Hill Education.
- Ogata, K. (2013). Discrete-Time Control Systems. Pearson.
- Berk, S. (2012). Engineering Mathematics using MATLAB. CRC Press.
- Franklin, G. F., Powell, J. D., & Emami-Naeini, A. (2014). Feedback Control of Dynamic Systems. Pearson.