Design at the system level. Part 1. From idea to system

Hello everyone. I often apply the principles of systems engineering in my work and would like to share this approach with the community.

System engineering - without standards, but in a simple way, this is the process of developing a system as a fairly abstract components, without reference to specific models of devices. During this process, the properties of the system components and the relationships between them are established. Additionally, it is required to make the system consistent and optimal and that the system meets the requirements. In this tutorial, I will show you the techniques of systems engineering using the example of designing a fairly simple access control system (ACS).

We form the initial architecture


When a system, no matter which one, is just beginning to be developed, rectangles with arrows appear in our heads or on paper. Such rectangles are the components of the system. And arrows are connections between components. And very often we don’t have time to sit and think about how all the components that we determined will work with each other, and in the end we start to create a bunch of crutches, inventing redundant designs.

It is important to remember that from the point of view of the system and its architecture, a component is a rather abstract thing. For example, if there is a microcontroller in our system, then at the architecture level it is only important for us that it is a microcontroller, and not that it is an STM32, Arduino or Milander. Moreover, often we don’t even understand what exactly will be in the system, and we turn to system engineering to develop requirements for equipment, software, etc.

For our example with ACS, we will try to formulate its purpose. This will help us in identifying its components. So, the task of access control systems is to let a limited circle of people into the room. That is, it is a smart lock. Therefore, we have the first component - a kind of device that locks and unlocks the door! Let's call it DoorLock

And how do we know that a person can get inside? We don’t want to put a guard and check passports? Let's give people special cards with RFID tags, on which we will write unique IDs or other data that allows us to accurately identify a person. Then, we need some device that can read these tags. Great, we have another component, RFIDReader

Let's look again at what we got. RFIDReader reads some data, the ACS system does something with them, and based on this, DoorLock manages something. We ask the following question - where to store the list of people with access rights? Best in a database. Therefore, our system must be able to send requests and process responses from the database. So we have another component - DBHandler . So, we got an extremely abstract, but sufficient to begin with a description of the system. We understand what she should do and how it works.

Instead of a piece of paper, I use System Composer, a special tool for modeling system architectures in a Simulink environment and create 3 components. Above, I described the relationships between these components, so immediately connect them:



Expanding Architecture


Let's look at our diagram. Everything seems to be fine, but not really. Look at this system from the point of view of the user - the user brings the card to the reader and ...? How does the user know that they are allowed or denied access? It’s necessary to somehow inform him of this! Therefore, we add another component - the notification of the user, UserNotify :



And now we go down to the level of abstraction lower. Let's try to paint some components in a little more detail. Let's start with the RFIDReader component. In our system, this component is responsible for reading the RFID tag. Its output should be some data (UID, user data ...). But wait, RFID, like NFC, is primarily hardware, not software! Therefore, we can assume that we separately have the chip for RFID itself, which transfers the raw data to a certain preprocessor. In total, we have an abstract piece of iron that can read RFID tags, and abstract software that can convert data to the format we need. We will call them RFIDSensor and RFIDParser, respectively. How to display this in System Composer? You can remove the RFIDReader componentand put two components in its place, but it’s better not to do that, so we will lose the readability of the architecture. Instead, let's go inside RFIDReader and add 2 new components:



Great, now let's move on to notifying the user. How will the system notify the user that he is denied or allowed access to the premises? A person perceives sounds and something blinking best. Therefore, you can issue a certain sound signal, so that the user would pay attention, and blink the LED. Add the appropriate components to UserNotify :



We created the architecture of our system, but something is wrong with it. What? Let's look at the names of the connections. InBus and OutBus are not quite normal names that would help the developer. They must be renamed:



So, we looked at how the systems engineering methods are applied in the most crude approximation. The question arises - why apply them at all? The system is primitive, and it seems that the work done is superfluous. You could immediately write code, design a database, write queries, or solder. The problem is that if you do not think over the system, do not understand how its components are related to each other, then the integration of system components will go on for a long time and quite painfully.

The main conclusion from this part is as follows:

Application of systems engineering and architecture modeling methods in system design allows reducing the cost of component integration and improving the quality of the developed system.

All Articles