Free Essay

Matlab & Ss

In: Science

Submitted By meorean
Words 2151
Pages 9
Lab 1: Introduction to MATLAB

Warm-up MATLAB is a high-level programming language that has been used extensively to solve complex engineering problems. The language itself bears some similarities with ANSI C and FORTRAN. MATLAB works with three types of windows on your computer screen. These are the Command window, the Figure window and the Editor window. The Figure window only pops up whenever you plot something. The Editor window is used for writing and editing MATLAB programs (called M-files) and can be invoked in Windows from the pull-down menu after selecting File | New | M-file. In UNIX, the Editor window pops up when you type in the command window: edit filename (‘filename’ is the name of the file you want to create). The command window is the main window in which you communicate with the MATLAB interpreter. The MATLAB interpreter displays a command >> indicating that it is ready to accept commands from you. • View the MATLAB introduction by typing >> intro at the MATLAB prompt. This short introduction will demonstrate some basic MATLAB commands. • Explore MATLAB’s help capability by trying the following: >> help >> help plot >> help ops >> help arith • Type demo and explore some of the demos of MATLAB commands. • You can use the command window as a calculator, or you can use it to call other MATLAB programs (M-files). Say you want to evaluate the expression [pic], where a=1.2, b=2.3, c=4.5 and d=4. Then in the command window, type: >> a = 1.2; >> b=2.3; >> c=4.5; >> d=4; >> a^3 + sqrt(b*d) - 4*c ans = -13.2388 Note the semicolon after each variable assignment. If you omit the semicolon, then MATLAB echoes back on the screen the variable value.
Arithmetic Operations There are four different arithmetic operators: + addition - subtraction * multiplication / division (for matrices it also means inversion) There are also three other operators that operate on an element by element basis: .* multiplication of two vectors, element by element ./ division of two vectors, element-wise .^ raise all the elements of a vector to a power. Suppose that we have the vectors x = [[pic],[pic], ..., [pic]] and y = [[pic],[pic], ...,[pic]]. Then x. * y = [[pic],[pic], ..., [pic]] x./y = [[pic],[pic], ..., [pic]] x.ˆp = [[pic],[pic], ...,[pic]] The arithmetic operators + and - can be used to add or subtract matrices, scalars or vectors. By vectors we mean one-dimensional arrays and by matrices we mean multi-dimensional arrays. This terminology of vectors and matrices comes from Linear Algebra. Example: >> X = [1,3,4] >> Y = [4,5,6] >> X + Y ans= 5 8 10 For the vectors X and Y the operator + adds the elements of the vectors, one by one, assuming that the two vectors have the same dimension. In the above example, both vectors had the dimension 1 × 3, i.e., one row with three columns. An error will occur if you try to add a 1 × 3 vector to a 3 × 1 vector. The same applies for matrices. To compute the dot product of two vectors (i.e. [pic]), you can use the multiplication operator * . For the above example, it is: >> X*Y' ans = 43 Note the single quote after Y. The single quote denotes the transpose of a matrix or a vector. To compute an element by element multiplication of two vectors (or two arrays), you can use the .* operator: >> X .* Y ans = 4 15 24 That is, X.*Y means [1×4, 3×5, 4×6] = [4 15 24]. The ‘.*’ operator is used very often (and is highly recommended) because it is executed much faster compared to the code that uses for loops.
Complex numbers MATLAB also supports complex numbers. The imaginary number is denoted with the symbol i or j, assuming that you did not use these symbols anywhere in your program (that is very important!). Try the following: >> z = 3 + 4i % note that you do not need the ‘*’ after 4 >> conj(z) % computes the conjugate of z >> angle(z) % computes the phase of z >> real(z) % computes the real part of z >> imag(z) % computes the imaginary part of z >> abs(z) % computes the magnitude of z You can also define the imaginary number with any other variables you like. Try the following: >> img = sqrt(-1) >> z = 3 + 4*img >> exp(pi*img)
Array indexing In MATLAB, all arrays (vectors) are indexed starting with 1, i.e., y(1) is the first element of the array y. Note that the arrays are indexed using parenthesis (.) and not square brackets [.] as in C/C++. To create an array having as elements the integers 1 through 6, just enter: >> x=[1,2,3,4,5,6] Alternatively, you can use the : notation, >> x=1:6 The notation above creates a vector starting from 1 to 6, in steps of 1. If you want to create a vector from 1 to 6 in steps of say 2, then type: >> x=1:2:6 Ans = 1 3 5 Try the following code: >> ii=2:4:17 >> jj=20:-2:0 >> ii=2:(1/10):4 Extracting or inserting numbers in a vector can be done very easily. To concatenate an array, you can use the [ ] operator, as shown in the example below: >> x=[1:3 4 6 100:110] To access a subset of the array, try the following: >> x(3:7) >> length(x) % gives the size of the array or vector >> x(2:2:length(x))
Allocating memory You can allocate memory for one-dimensional arrays (vectors) using the zeros command. The following command allocates memory for a 100-dimensional array: >> Y=zeros(100,1); >> Y(30) ans = 0 Similarly, you can allocate memory for two-dimensional arrays (matrices). The command >> Y=zeros(4,5) defines a 4 by 5 matrix. Similar to the zeros command, you can use the command ones to define a vector containing all ones, >> Y=ones(1,5) ans= 1 1 1 1 1
Special characters and functions Some common special characters used in MATLAB are given below:

[pic]

Some special functions are given below: length(x) - gives the dimension of the array x find - Finds indices of nonzero elements. Examples: >> x=1:10; >> length(x) ans = 10 The function find returns the indices of the vector X that are non-zero. For example, I = find(X>100), finds all the indices of X when X is greater than 100. So for the above Example: >> find(x> 4) ans = 5 6 7 8 9 10
Control flow MATLAB has the following flow control constructs: • if statements • switch statements • for loops • while loops • break statements The if, for, switch and while statements need to terminate with an end statement. Examples: IF: x = -3; if x > 0 str = 'positive'; elseif x < 0 str = 'negative'; elseif x == 0 str = 'zero'; else str = 'error'; end

What is the value of ’str’ after execution of the above code?

WHILE: x = -10; while x < 0 x = x + 1; end What is the value of x after execution of the above loop? FOR loop: X=0; for i=1:10 X=X+i; end

The above code computes the sum of all numbers from 1 to 10. BREAK: The break statement lets you exit early from a for or a while loop: x = -10; while x < 0 x = x + 2; if x == -2 break; end end MATLAB supports the following relational and logical operators: Relational Operators Symbol Meaning = Greater than equal > Greater than == Equal ˜ = Not equal Logical Operators Symbol Meaning & AND | OR ˜ NOT
Plotting
You can plot arrays using MATLAB’s function plot. The function plot (.) is used to generate line plots. The function stem(.) is used to generate “picket-fence” type of plots. Example: >> x = 1:20; >> plot(x) %see Figure 1 >> stem(x) % see Figure 2
[pic]
Example of a plot generated using the plot command is shown in Figure 1, and example of a plot generated using the stem function is shown in Figure 2. More generally, plot(X,Y) plots vector Y versus vector X. Various line types, plot symbols and colors may be obtained using plot(X,Y,S) where S is a character string indicating the color of the line, and the type of line (e.g., dashed, solid, dotted, etc.). Examples for the string S include:
[pic]

[pic] You can insert x-labels, y-labels and title to the plots, using the functions xlabel(.), ylabel(.) and title(.) respectively. To plot two or more graphs on the same figure, use the command subplot. For instance, to show the above two plots in the same figure, type: >> subplot(2,1,1), plot(x) >> subplot(2,1,2), stem(x) The (m,n,p) argument in the subplot command indicates that the figure will be split in m rows and n columns. The ‘p’ argument takes the values 1, 2. . . m× n. In the example above, m = 2, n = 1, and, p = 1 for the top figure and p = 2 for the bottom figure. [pic] To get more help on plotting, type: help plot or help subplot.
Programming in MATLAB (M-files) MATLAB programming is done using M-files, i.e., files that have the extension .m. These files are created using a text editor. To open the text editor, go to the File pull-down menu, choose New, then M-file. After you type in the program, save it, and then call it from the command window to execute it. Say for instance that you want to write a program to compute the average (mean) of a vector x. The program should take as input the vector x and return the average of the vector. Steps: 1. You need to create a new file, called “average.m”. If you are in Windows, open the text editor by going to the File pull-down menu, choose New, then M-file. If you are in UNIX, then type in the command window: edit average.m. Type the following in the empty file ________________________________ function y = average(x) L = length(x); sum = 0; for i = 1:L sum = sum + x(i); end y = sum/L; % the average of x ________________________________ Remarks: y — is the output of the function “average” x — is the input array to the function “average” average — is the name of the function. It’s best if it has the same name as the filename. MATLAB files always need to have the extension .m 2. From the Editor pull-down menu, go to File | Save, and enter: average.m for the filename. 3. Go to the Command window to execute the program by typing: >> x = 1:100; >> y = average(x) ans = 50.5000 Note that the function average takes as input the array x and returns one number, the average of the array. In general, you can pass more than one input argument and can have the function return multiple values. You can declare the function average, for instance, to return 3 variables while taking 4 variables as input with the following statement: function [y1, y2, y3] = average(x1,x2,x3,x4) In the command window it has to be invoked as: >> [y1, y2, y3] = average(x1,x2,x3,x4)
MATLAB sound If your PC has a sound card, then you can use the function soundsc to play back speech or audio files through the PC’s speakers. The usage of this function is given below: soundsc(Y,FS) sends the signal in vector Y (with sample frequency FS) out to the speaker on platforms that support sound. Stereo sounds are played, on platforms that support it, when Y is an N-by-2 matrix. Try the following code, and listen to a 400-Hz tone: >> t=0:1/8192:1; >> x=cos(2*pi*400*t); >> soundsc(x,8192); Now, try listening to noise: >> noise=randn(8192,1); % generate 8192 samples of noise >> soundsc(noise,8192); The function randn generates Gaussian noise.
Loading and saving data You can load or save data using the commands load and save. To save the variable x of the above code in the file data.mat, type: >> save data.mat x Note that MATLAB’s data files have the extension .mat. To retrieve the data that was saved in the vector x, type: >> load data.mat The vector x is loaded in memory. To see the contents of memory use the command whos: >> whos Name Size Bytes Class X 1x8193 65544 double array Grand total is 8193 elements using 65544 bytes The command whos gives a list of all the variables currently in memory, along with their dimension. In our case, x contained 8193 samples. To clear up memory after loading a file, you may type clear all when done. That is very important, because if you do not clear all the variables in memory, you may run into problems with other programs that you will write that use the same variables.

Similar Documents

Free Essay

Human Step Detection and Counting with a Microphone (June 2015)

...alternative use of sensors for detecting human movements such as footsteps and that is done for various reasons such as security or just for lightning a lamp automatically. We developed a Simulink model in Matlab to simulate a system that analyses the footsteps of three 25 years old men. Those men had different heights and weights. The data were recorded and analyzed using filtering and conditioning blocks of Matlab. The System collected 3 sets of steps. The first set had 5 steps with 5 detections. The second set had 8 steps with 3 detection and the third set had 4 steps with 1 detections. In total, there were 17 steps where 9 steps were detected. I. C. Procedure During the first part of the experiment, the footsteps were recorded on the main corridor of the first floor of the house 21, located in the University of Kristianstad. We also recorded the steps at our respective houses. The experiment was carried on a floor without carpet to allow a better collection of the data. This procedure was repeated several times, until satisfactory data without much noisy could be acquired. INTRODUCTION T HE objective of this work was to detect the steps of a person using a microphone array embedded in our computer together with the Simulink library of Matlab. We have some background of the idea after reading a few articles regarding this type of experiments. Fig. 1. Simulink models used to record the steps In the articles we read, the......

Words: 1833 - Pages: 8

Free Essay

Forecasting Models

...MATLAB® Getting Started Guide R2011b How to Contact MathWorks Web Newsgroup www.mathworks.com/contact_TS.html Technical Support www.mathworks.com comp.soft-sys.matlab suggest@mathworks.com bugs@mathworks.com doc@mathworks.com service@mathworks.com info@mathworks.com Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information 508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098 For contact information about worldwide offices, see the MathWorks Web site. MATLAB® Getting Started Guide © COPYRIGHT 1984–2011 by The MathWorks, Inc. The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form without prior written consent from The MathWorks, Inc. FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through the federal government of the United States. By accepting delivery of the Program or Documentation, the government hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and conditions of this Agreement and only those......

Words: 36443 - Pages: 146

Free Essay

Sunflower

...sunflower, had been planted. Upon seeing this, he experienced envy for the soldiers who were still connected to “the living world”(Wiesenthal, 1998, p. 14). Simon indicated his desensitization to death, but upon seeing the graves with flowers and knowing when he died, he would be placed in an unmarked grave with no flowers to tie him to this world, he felt bitterness along with a small hope that he “would come across them again; that they were a symbol with a special meaning”(Wiesenthal, 1998, p. 15). Arriving to the work site, Simon is approached by a nurse inquiring if he was Jewish. Acknowledging this, she took him to a room that had been transformed into a sickroom for Karl, a dying SS soldier. Karl’s story began with his youth and Catholic upbringing and he joined the Hitler Youth and SS willingly. He then gave his account of the crime he committed and was so desperately seeking forgiveness for. Simon listened silently to the murder of more Jews and walked away grappling with the thought, “here was a dying man-a murder who did not want to be a murder but who had been made into a murder by murderous ideology.”(Wiesenthal, 1998, p. 53) but his own death could come at any time from someone such as Karl. He left in silence and through the remainder of the holocaust and in the visit to Karl’s mother Simon kept silent. Simon clearly states his silence...

Words: 2189 - Pages: 9

Premium Essay

This Way for the Gas, Ladies & Gentlemen

...blasted camp. All of us live on what they bring,” Henri states to the narrator (Charters 152). Keeping themselves alive is of great importance. How can they even think of revolting? The language used by the narrator is also enough to prove that in no way did Borowski condone any of the things he was forced to do: “It is the camp law: people going to their death must be deceived to the very end. This is the only permissible form of charity” (156). The narrator realizes that, either way, the prisoners coming off the transports were doomed, so keeping them in the dark would allow them to follow directions calmly and have less anxiety. The narrator and ultimately Borowski himself were both at one point in that same stage of concern. The SS soldiers act in a nonchalant fashion when barking orders and sending people to their death, but the...

Words: 744 - Pages: 3

Free Essay

Problem in Classrrom

...minutes | | | Objectives | Procedure and Activities | Time | Teaching Aids | Evaluation | Pupils will be able to : | -T greets the Ss, revises the previous lesson and checks for the H.w and corrects it with them. | 5 minutes | | | 1- Guess the meaning of the new words through flashcards and examples. | - T asks general questions and writes the first letter of each answer on the board :- Something lives in the seas and oceans? Fish- A country starts with the letter A: America- You use it to call people around the world? Mobile- Frozen water? Ice- Type of computer, can be taken anywhere? Laptop - The city we live in? YanbuThe letters form the word FAMILY, Ss read it loudly together.-T Hangs flashcards on the board asks Ss to guess the meaning of the new words through flashcards. (Appendix 1)- T has them to open their book on p.40, Ss answer the questions about Sara's family. | 15 minutes | FlashcardsBoardMarker | * What a family is? * Who is this? * What do we call our mothers? * What do we call our fathers? | 2- Practice and write the new vocabulary correctly. | -T distributes worksheets, Ss work individually. (Appendix 2)-After they finish, they solve it together. -T plays the CD, and Ss listen to the conversation carefully and then has them to practice the conversation in pairs.-T distributes another worksheet (Appendix 3), Ss also work individually. | 15 minutes | WorksheetsBook p.41 | * Look at the picture and write the correct word. * Read......

Words: 737 - Pages: 3

Premium Essay

Our Secret

...Secret’’ pp. 712-713, Alternative Assignment #4 Withney Belanger November 14, 2012 English 101, Section 16 Margaret Bratsenis Work Cited Griffin Susan. “Our Secret.’’ Ways of Reading. 9th Ed. David Bartholomae, and Anthony Petrosky. Boston: Bedford/ St. Martin’s, 2011. 712-713.Print. Crystal Lee “The Effects of Parental Alienation on Children” Belanger 1 In Susan Griffin’s essay, “Our Secret,’’ she talks about her secrets and she gives detailed insights into her life and ones of those that suffered through the Holocaust. The three biggest parts that she talks about is her own feelings, secrets and fears, her own experiences, the life of Heinrich Himmler, Leo, Helene, and Chief of the Nazi SS. The way that she organized her essay was very confusing and it would jump around a lot so you never really understood how everything would come together in the end. Griffin’s says “The DNA molecule is made of long, fine paired stands. These strands are helically coiled” (Griffin 379). Griffin’s tells what happens to the nucleus, and how the inner-workings of the nucleus develop into a cell which gives rise to many cells, which will eventually become an embryo. So the cell is how someone was made with and your development can be affecting you as you growing up. Baby is born with no secrets, innocent with arms wide open and then she is implying that at that point in a person’s life is the only point where there are no secrets.......

Words: 776 - Pages: 4

Free Essay

How Did the Treblinka Inmates Escape

...How Did the Treblinka Inmates Escape? 2 August 1943 Treblinka was a Nazi extermination camp that was part of Operation Reinhard –the code name given to the Nazi plan to murder Polish Jews. Treblinka was located 90 kilometres northeast of the city  Warsaw and operated from July 1942 to October 1943. It was divided into Camp 1 and Camp 2. In the first camp, the victims were sent to the gas chambers and in the second camp their bodies were burned. Many of the victims, mainly Jews, came from the Warsaw Ghettos, and did not know where or for what reason they were travelling. Soon they found out the horrors they were about to face. As people arrived, men, women and children were separated. They were screamed at, whipped, stripped of their clothing and belongings, their hair was cut, before being sent to gas chambers that could kill several thousand a day. Those who were sick, old and newborns that would not stop crying, were taken away to be shot. Some men were taken as workers, called “Sonderkommandos”. These people had many jobs around Treblinka ranging from having to move the dead bodies and to checking for gold teeth, shaving the heads of those who were to die, rooting through the belongings for valuables, and cleaning the gas chambers. Their day-to-day jobs pushed them toward suicide, which was not uncommon.   Life was unbearable and soon the inmates to realised that their only chance of leaving the camp alive was if they escaped. Zelo Bloch. Dr. Julian Chorazycki, Zev......

Words: 1169 - Pages: 5

Premium Essay

Susan Griffin

...web that every person in the world is a part of. This web connects us to every person that has had an influence on us. The people we see every day, our family and friends, are the ones directly connected to us. We meet someone new, another new connection in the web. We are even connected to people we have never met. Friends of friends, and people who we may never meet but have some indirect effect on us, form the outer circle of the web. We are all connected in some way to every other person. Susan Griffin explores this theory of a complex matrix of connections in her essay “Our Secret”. She employs a style of writing that uses several different threads of stories from her own experiences and the life of Heinrich Himmler, Chief of the Nazi SS, as well as references to seemingly unrelated topics such as missile production and cells to weave the fabric of her theory of universal interconnectedness. At first glance, each passage seems unrelated to the next, but after thorough reading a juxtaposition of the threads is evident. Through her entire essay, Griffin uses underlying themes that connect each thread and anecdote to one another. One of the main themes that is interwoven through her essay is child rearing and the effect that different styles of parenting have on the child later in life. One relationship between father and son she explores is Heinrich Himmler and his father Gebhard. Gebhard was a tyrannical father, not uncommon in Germany in the 1900s, who strove to......

Words: 1397 - Pages: 6

Free Essay

Hitlers Army

...Essential Questions: The Schutzstaffeln (SS) A) The Sturmabteilung (SA) functioned as the original paramilitary wing of the Nazi Party. It played a key role in Adolf Hitler's rise to power in the 1920s and 1930s. Their main assignments were providing protection for Nazi rallies and assemblies, disrupting the meetings of the opposing parties, fighting against the paramilitary units of the opposing parties) and intimidating Jewish citizens. SA men were often called "brown shirts" for the color of their uniform. B) Adolf Hitler founded the Schutzstaffel (SS) in April of 1925, as a group of personal bodyguards. Thanks to Himmler, this small band of bodyguards grew from 300 members in 1925 to 50,000 in 1933 when Hitler took office. Between 1934 and 1936, the SS gained control of Germany's police forces and expanded their responsibilities. Because of these new responsibilities, the SS divided into two sub-units: the Allgemeine-SS (General SS), and the Waffen-SS (Armed SS). (Simon) states that unlike the SA, who were considered to be a separate paramilitary organization working for the good of the State, the SS was under Hitler's total control. Easily recognizable by the lightning-shaped "S" insignia on their black uniforms, they soon became known as the purest of all Germans. As the SS grew and became more complex, it matured into the spine of the Nazi regime. C) The Waffen-SS (Armed SS) consisted of three main groups. The first was the Leibstandarte, Hitler's personal......

Words: 373 - Pages: 2

Premium Essay

The Sunflower

...of innocent lives were taken in cold blood. It doesn’t matter whether your ancestors were involved, or if you were around to experience it, you only have to be human in order to feel for all of the people who were affected. Over the years studies like Milgram’s Obedience Experiment, and Zimbardo’s Stanford Prison Study have shed light on some of the basic roots of human evil, but these roots are not enough to pave the way for forgiveness of the events that occurred. Simon Wiesenthal’s story “The Sunflower” exploits these evils and presently brings us into the life and character of Simon, a Jew in a concentration camp in Poland, who has ultimately been sentenced to death for just being born the way he is. He is brought to the bed of a dying SS Nazi soldier named Karl, who after telling him of his life decisions, asks for forgiveness as his dying wish. Simon leaves the soldier in silence, and we never find out if he ever truly forgives him. But Wiesenthal does leave us all with the question of what we would do in his position. With such brutalizing and horrific events, the atrocities that Karl commits are unforgivable because he willingly participates to take the lives of innocent people, which are acts that cannot be undone. When brought to the deathbed of another man, it is hard to imagine not granting his last dying wish. On page 54 Karl says, “I know that what I am asking is almost too much for you, but without your answer I cannot die in peace”. In this case it seems as......

Words: 1414 - Pages: 6

Premium Essay

Individual

...HARVARD Reference Style Guide Notes: Please "copy" the title of a book/an article/whatever (as far as the spelling of words such as "behavior"/"behavioral" are concerned (and this also goes for direct quotations) exactly as in the original. • • • When referring to any work that is NOT a journal, such as a book, article, or Web page, capitalise only the first letter of the first word of a title and subtitle, the first word after a colon or a dash in the title, and proper nouns. Do not capitalise the first letter of the second word in a hyphenated compound word. Capitalise all major words in journal titles. If within the same paragraph, reference is made to the same author(s) for a second and further time(s), the year of publication is omitted in the second and further references - as long as it does not lead to confusion. Multiple publications; same author • Same author; different years Normal conventions (author, year, title, etc). • Same author; same year More than one reference by an author in the same year: these are distinguished in order of publication using a lower-case alphabetical suffix after the year of publication (eg 1988a, 1988b, 1988c, etc). The same suffix is used to distinguish that reference for the in-text citations. Order of Listing The List of References is ordered alphabetically by primary authors' surnames. • Multiple authors. o Use the sequence of authors' surnames exactly as given in the publication. The primary author, ie, major contributor,...

Words: 4032 - Pages: 17

Premium Essay

Dell Trategic Planning

...HARVARD Reference Style Guide an g ro eh n sa y caxe )sno a ouq ...llllaniiiigiiiiro ehtt niiii sa yllllttcaxe )snoiiiittttattttouq . an g ro ehtt n sa y ttcaxe )sno a ouq an g ro eh n sa y caxe )sno a ouq cer d ro seog os a s h dna( denrecnoc era " aro vaheb" "ro vaheb" sa hcus sdrow o gn eps eh sa ra sa( reve ahw e c ra na koob a o e eh "ypoc" esae P se oN cer d ro seog os a s h dna( denrecnoc era " aro vaheb" "ro vaheb" sa hcus sdrow o gn eps eh sa ra sa( reve ahw e c ra na koob a o e eh "ypoc" esae P se oN ttttceriiiid roffff seog oslllla siiiihtttt dna( denrecnoc era "llllaroiiiivaheb"////"roiiiivaheb" sa hcus sdrow ffffo gniiiilllllllleps ehtttt sa raffff sa( revettttahw////ellllciiiittttra na////koob a ffffo ellllttttiiiitttt ehtttt "ypoc" esaellllP ::::settttoN cer d ro seog os a s h dna( denrecnoc era " aro vaheb" "ro vaheb" sa hcus sdrow o gn eps eh sa ra sa( reve ahw e c ra na koob a o e eh "ypoc" esae P se oN • • • • Order of Listing The List of References is ordered alphabetically by primary authors' surnames. • Multiple authors. o Use the sequence of authors' surnames exactly as given in the publication. The primary author, ie, major contributor, is listed first by the publisher. • Same author: o different years: list the author's references chronologically, starting with the earliest date. o same year: use an alphabetical suffix (eg 1983a, 1983b). Compiled by OpenJournals Publishing When referring to any work that is NOT a journal, such as a book,......

Words: 4229 - Pages: 17

Free Essay

Examen Realimentacion de Estado

...En la figura se muestra el diagrama de bloques de un sistema que se desea controlar mediante un control por realimentación de estado. Se pretende que el error de seguimiento a la referencia sea 0 y que la función de transferencia de lazo cerrado sea la de un sistema de 2o orden sin ceros y con un amortiguamiento igual a 0.7. Además se desea la respuesta más rápida posible a un escalón de 0 a 5 en la referencia sin saturación del mando. Los límites del mando valen +/-10. a) Obtener la representación de estado del sistema a controlar con entrada U y salida Y. [2] Siguiendo los caminos desde la entrada de los integradores, siempre en sentido contrario a las flechas, se obtiene una representación de estado como la siguiente: 1 2 = 0 −0 1 1 · −0 7 1 2 1 2 + 0 ·U 1 Y = 1 1 · + 0 ·U b) Dibujar un diagrama de bloques del sistema de control por realimentación de estado que cumpla con las especificaciones deseadas. Supóngase que tanto la salida como las variables de estado se pueden medir. Especificar la frontera del control, es decir, qué partes del sistema se programarían en un microprocesador. [2] c) Diséñese el control, especificando los valores numéricos de todas las ganancias necesarias. [2] En un archivo .m se introducen las matrices A, B, C, y D que se han hallado anteriormente. El siguiente paso es calcular las matrices ampliadas, estas matrices son de la forma:  A A = −C B = B −D  0 0 0 Examen de realimentación de estado David Polo......

Words: 2019 - Pages: 9

Free Essay

Aircraft Flight

...Exam 2 Part A (a.) We first created the “trim” file to determine the required control (elevator and thurst setting) to achieve specific equilibrium flight by minimizing the left hand side of equations (2.5-34) which are equations for the time derivatives of the velocity, angle of attack, pitch rate, and pitch angle. The “transp” function is used in the “trim” file to determine the rate of changes for these specified controls. Once trimmed flight is achieved, the non-dimensional characteristics of this flight are used to determine the dimensional derivatives needed to set up the state space model for the trimmed flight. Once the dimensional derivatives are computed, the state space angle of attack, pitch rate, velocity, and pitch can be set up. Several characteristics of both the short period and phugoid of this state space model can be seen in Table 1. Table 1: A table of system characteristics for both the short term period and phugoid Characteristic | Short Period | Phugoid | Eigenvalues | -0.6252 +/- 1.3188i | -0.0021 +/- 0.0780i | Time Period (s) | 1.5995 | 486.9 | Frequency (s^-1) | 1.3188 | 0.078 | Settling Time (s) | 6.398 | 1947.6 | Period of Oscillation (s) | 4.7645 | 80.5 | Natural Frequency (s^-1) | 1.4594 | 0.0781 | Damping Ratio | 0.4284 | 0.0263 | Part B We were tasked with plotting the Argand diagrams associated with the individual phugoid and short-period modes. An argand diagram is a scaled representation of the eigenvectors,......

Words: 1486 - Pages: 6

Free Essay

Design Machine

...enclosure); if that is not possible, appropriate directions or warnings are provided. • Reliable : Reliability is the conditional probability, at a given confidence level, that the product will perform its intended function satisfactorily or without failure at a given age. • Competitive : The product is a contender in its market. • Usable : The product is “user-friendly” accommodating to human size, strength, posture, reach, force, power, and control. • Manufacturable : The product has been reduced to a “minimum” number of parts, suited to mass production, with dimensions, distorsion, and strength under control. • Marketable : The product can be bought, and service (repair) is available. Human & Computer Programs There are many programs – Matlab, Excel, Ansys, Abaqus, AutoCAD, I-DEAS, etc. You should keep in mind, • The computer can remember data and programs. • The computer can calculate. • The computer can branch conditionally and unconditionally. Branching based on truth or falseness is akin to decision making. • The computer can iterate, do a repetitive task a fixed or appropriate number of times. • The computer can read and write both alphabetic and numerical information. • The computer can draw, sometimes fast enough to animate in real time. • The computer can pause and wait for external decisions or thoughtful input. • The computer does not tire. •...

Words: 898 - Pages: 4