assignment2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Page 1

Name: Indian Institute of Technology Kanpur


CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

Total: 50 marks
Problem 1. (10 points) Provide the state-space representation of the dynamics of a DC Motor. Assume that
there is no additional load on the motor. Next, Design a Simulink model to capture the dynamics and simulate
the model for an input PWM voltage signal with magnitude 1V, frequency 1 kHz and duty cycle 0.1. Assume
that the kinetic friction of the motor is negligible. Take the values of the other parameters from Example 7.13
in [LS15]. Provide the plot showing how the angular velocity of the motor varies with time.
[LS15] Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems
Approach, Second Edition, http://LeeSeshia.org, ISBN 978-1-312-42740-2, 2015.
Page 2
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 3
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 4
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 5
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 6
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

Problem 2. (10 points) Consider the vehicle steering control problem in Example 6.4 in [AM09]. Assume
that k1 = 1, k2 = 1.6, and kr = 1. Model the control system in Simulink using double precision floating
point arithmetic. Now replace the model of the controller with the ones that use 16 bit and 8-bit fixed-point
arithmetic. In each case, determine the fixed-point data types precisely. Plot the difference between the first
state for the floating-point controller and that for the fixed-point controllers. Generate code for both the floating
point controller and the fixed-point controllers using different optimization options. Describe the steps you have
followed for the code generation.
[AM09] K. J. Astrom and R. M. Murray. Feedback Systems: An Introduction for Scientists and Engineers.
Princeton University Press, 2009.
http://www.cds.caltech.edu/∼murray/books/AM05/pdf/am08-complete 22Feb09.pdf.
Page 7
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 8
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 9
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 10
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 11
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

Problem 3. (10 points) Work out Problem 1 in the Exercises of Chapter 9 in [LS15].

[LS15] Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems
Approach, Second Edition, http://LeeSeshia.org, ISBN 978-1-312-42740-2, 2015.
Page 12
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 13
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 14
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 15
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 16
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

Problem 4. (10 points) Work out Problem 3 in the Exercises of Chapter 12 in [LS15].

[LS15] Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems
Approach, Second Edition, http://LeeSeshia.org, ISBN 978-1-312-42740-2, 2015.
Page 17
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 18
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 19
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 20
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 21
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

Problem 5. (10 points) Work out Problem 6 in the Exercises of Chapter 12 in [LS15].

[LS15] Edward A. Lee and Sanjit A. Seshia, Introduction to Embedded Systems, A Cyber-Physical Systems
Approach, Second Edition, http://LeeSeshia.org, ISBN 978-1-312-42740-2, 2015.
Page 22
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 23
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 24
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023
Page 25
Name: Indian Institute of Technology Kanpur
CS637 Embedded and Cyber-Physical Systems
Roll No: Dept.: Homework Assignment 2
e.g. 170001 e.g. CSE Deadline: October 13, 2023

You might also like