Papyrus-RT and Simulink for Modelling Behaviour Assignment Help

Papyrus-RT and Simulink for Modelling Behaviour Assignment Help

Description

In this assignment you will demonstrate your understanding the two new tools introduced for modeling behavior: Papyrus-RT and Simulink. You will be modeling (semantically) the same system in both tools.

Details

There will be 2 parts to this assignment. You will be creating a system to generate random numbers, process them in in some manner, then compare the results for output. You will implement the system in both Papyrus-RT and in Simulink.

  1. The following is the basic behavior of the system regardless of implementation:
    1. You must generate 3 random numbers between 1 and
    2. Each random number must be passed to some other component to process the number in some way:
      1. The first, called A, will double the
      2. The second, called B, will add 37 to the
  • The third, called C, will square the number and subtract
  1. All three results will be stored for
  2. The highest of the three values will determine the winner:
    1. If A is the highest, then A wins; if B is the highest, then B wins,
  3. You will need to keep track of the winner in each round (A, B, or C), and a count for each of them to determine an overall
  4. Ultimately, your competition will have 100 values, thus 100 rounds of competition, and the number of winners should add up to
  1. The following should be considered for your Papyrus-RT implementation:
    1. You will need 4 capsules: 1 central capsule for the generator and comparison, and 1 for each of A, B, and
    2. You will need protocols for communication between the appropriate
    3. This assignment will require passing of parameters with messages – you will need to look into how to do
    4. A, B, and C should only receive messages with a number, process it in their own way, and send it back to the central
    5. The central capsule should wait to receive all three results back, compare them, and determine that round’s winner (logging output), as well as update counters for the winner.
    6. At the end of the 100 runs, the system should pick an ultimate winner; that is the system (A, B, or C) that had the most wins over the 100
  2. The following should be considered for your Simulink implementation:
    1. You will need a variable to keep track of wins for A, B, and
    2. You will also need to count the number of wins for each of A, B, and
    3. Processing for A, B, and C should take place in separate
    4. Your values should work for BOTH simulation AND generated
    5. Make sure to set all model properties as appropriate (things like solver type, step size, the type of output, )

 

  1. Once both are completed, you will need to “officially” run each 3 times as follows:
    1. Run your Papyrus-RT system by generating the code, and running it 3 times just as we did for Lab 5, redirecting output to files for inclusion in
    2. Simulate your Simulink model twice, then generate the code and run it once for the 3 runs. You will need to capture the output in the workspace after each

What to Submit

  • Your Papyrus-RT Implementation
    • Include all structure diagrams, state diagrams, and code snippets in the same manner and detail as for Lab
  • Your Simulink Model Implementation
    • A screenshot of the completed Simulink Model
    • You must show the inside of any contained subsystems by opening them up and providing additional screenshots.
  • Your Papyrus-RT Outputs
    • The contents of the 3 files containing your output for the 3
  • Your Simulink Outputs
    • A screenshot of the workspace after the two simulation runs – delete all values after each run
    • A screenshot of the workspace after generating and running the Executable file, and loading the resulting .mat file into the
Please follow and like us: