1 Introduction

A flawed design methodology generates around 85% of the problems in new products. Thus, enterprises must continuously improve their design process methodologies [1]. Design methodologies are also complex for novice designers and students to implement because a good design requires previous knowledge for making decisions regarding the new product. Product design usually is an iterative, refining process to satisfy the consumers’ needs. To reduce the number of iterations, designers must rely on excellent computer support tools for effective decision-making [2]. These must be available to novice designers or students designing new products. Innovative dynamics affect the design of products adopted and accepted in a dynamic market. These innovative dynamics involve technological evolution, improvements in cost and performance, experimentation and innovation, market growth, and market saturation, among others [3]. Naturally, the product design should include reconfigurable processes that adapt to these innovative dynamics.

Manufacturing systems and computer tools that facilitate the designing and launching of new products are essential in product design. Reconfigurable manufacturing systems have become extremely attractive because they can be more effective than traditional flexible manufacturing lines and cost-effective in swiftly launching new products that satisfy market needs. Besides, reconfigurable systems can maintain production despite failures in the system [4].

Three primary considerations must be included in designing a reconfigurable manufacturing system (RMS): capacity, functionality, and cost [5]. Graduate, undergraduate, and high school students require new learning methods to understand how to experimentally design complex products. On the one hand, food production is a vital task that must be improved to ensure equitable food distribution globally. On the other hand, there are countries in which domestic agriculture wastes natural resources, damages the environment, and generates low production. Those countries require advanced greenhouses designed to manage the inside environmental conditions [6]. Greenhouse technology integrates new software and hardware to achieve the necessary technical conditions for deploying advanced, smart greenhouses. Also, wireless communication networks can be assembled to monitor the greenhouse [7]. Advanced greenhouses are complex systems that can face a changing market. They effectively decrease the required harvest space and optimize 24-h crop harvesting, nutrients, cost-effectiveness, and energy savings. The advanced greenhouse is a valuable teaching laboratory in several engineering areas, such as product design, control systems, mechanical design, digital systems, and instrumentation.

Moreover, since COVID-19 has impacted most countries [8], students must learn how to design and build fully reconfigurable greenhouses that produce food autonomously or semi-autonomously. These would incorporate social distancing and other health restrictions. Crop production could continue because such greenhouses can be controlled and monitored remotely. In that sense, land use, natural resources for agricultural production, and the greenhouse's internal environment are protected.

The advanced greenhouse can also promote experimental learning in which graduate, undergraduate, and high school students have specific tasks to ensure the excellent performance of the greenhouse as a living lab [9]. This paper's primary goal is to implement the proposed strategic framework that includes reconfigurable features and computer tools to facilitate the design process of new products. It was proposed to design and build a reconfigurable greenhouse at Tecnologico de Monterrey, Mexico City campus, which could also be used when teaching various engineering topics such as advanced control systems and mechanical design to graduate and undergraduate students. The following link shows a short video that gives a general idea about this advanced greenhouse's implementation (https://www.youtube.com/watch?v=0vGweHtQmxs). Also, this greenhouse can be used to teach basic concepts of biology to high school students. Besides, the advanced greenhouse comprises physical and digital components that influence micro-climate conditions by combining sensing, control, and computational mechanisms. Consequently, the design of reconfigurable systems has assumed enormous importance in digital control and mechanical systems.

Currently, the manufacturing sector faces a collapse because manufacturing systems are not always reconfigurable and cannot adapt to new product requirements. Besides, the Fourth Industrial Revolution has pushed the development of new technologies, so production systems from different areas have benefited from the Industry 4.0 paradigm [10, 11], which has boosted cloud manufacturing, digitalization of manufacturing, tele-manufacturing, sustainable manufacturing, and reconfigurable manufacturing systems [12,13,14,15,16]. Agri-food industries have been finding new ways to reconceptualize and redesign their production systems to accommodate emerging technologies and new practices and strategies. Thus, they remain competitive in the marketplace and rise to the food demand challenges [17, 18]. Hence, the agri-food sector aligns with the Industry 4.0 paradigm and has become known as "Agri-Food 4.0" [18, 19].

Agri-food producers and farmers are starting to use new technology-based machines and tools, such as agri-robots (e.g., fruit-picking robots, driverless tractors, and sprayers, sheep shearing robots, unmanned aerial vehicle(UAV sprayers) and automatic production systems (e.g., irrigation, harvesting, breeding, automatic fertilizer, climate controllers) to achieve high production, flexibility, low prices of food products, guaranteed product quality, and shortened production times [20]. Nevertheless, the high cost of these technologies blocks the possibility of implementing them in small and medium-sized farming businesses, mainly in developing countries [13, 21, 22]. Therefore, low-cost technologies must be developed to respond to this sector's current challenges. Consequently, in this work, the design of reconfigurable systems is used as a strategy to offer the advantages of these technologies in agri-food production.

Several research papers focusing on designing a reconfigurable greenhouse have been published, but they are not enough papers that cover all the software and hardware elements required to design and operate a greenhouse. Below there are some representative papers that deal with reconfigurable greenhouses design. However, they do not present a complete methodology to design a greenhouse and do not consider hardware and software elements in one platform.

A novel control topology that could be deployed in reconfigurable greenhouses is presented in [57], but no hardware elements are described in this proposal; Besides, technological analysis and socio-institutional analysis could be considered during the design and operation of greenhouses are presented in [58]. Besides, there are novel methodologies to measure the variables in a greenhouse using IoT that can be integrated when a greenhouse is designed. However, IoT technologies could increase the cost of the complete greenhouse, and a complete study is presented in [59]. The operation and design conditions could be determined using the information of environmental variables as well as water and fertilizers [60]; moreover, digitalization can help to get more information to make decisions about agri-food production in order to get a continuous food supply production in greenhouses [61, 62]. These technologies can contribute when designing a greenhouse, but they do not consider a reconfigurable design of software and hardware elements. As a result, a complete design methodology that can be implemented in reconfigurable greenhouses, including software and hardware elements, is required. This combination of hardware and software elements could lead to integrating a cyber-physical system into the reconfigurable greenhouse.

The proposed framework could also be adopted in cyber-physical systems where physical and digital elements are combined [23]. Thus, the framework can provide flexibility when a reconfiguration is included in this cyber-physical system. In fact, an advanced greenhouse is a cyber-physical system. They include advanced digital greenhouse controls that manage several sections, such as ventilation systems that save electrical energy because they use AC rather than DC machines [24]. The advanced greenhouse has been designed using sensing, smart, and sustainable technologies that increment its capabilities [25]. In this context, reconfigurable systems have emerged in the agri-food sector as an imperative to improve the performance of greenhouses. For instance, [26] proposes a reconfigurable hydraulic arm for vegetable cropping, which can be mechanically adapted and configured depending on the type of vegetable produced. Also, reconfigurable robotic arms and manipulation systems have been used for food handling and packaging [27, 28]. Advanced control systems have been implemented in greenhouses to reduce energy consumption and dependency on fossil fuels [29]. The structure also has to be adapted to generate correct crop production; therefore, optimal structure design based on thermal models has been proposed to predict and control the inside temperature [30].

In 2017, the Thorvald II was presented, which is a mobile robot (for robotic harrowing and soil sampling) composed of reconfigurable modules that, with simple operations, work in a wide variety of environments, such as greenhouses, polytunnels, and open fields [20] and [31]. When it is required to get a real-time monitoring system, Wireless Sensor Networks (WSNs) can be adjusted to new locations [32]. Besides, WSNs have been implemented in real-time monitoring systems for greenhouses.

Designing reconfigurable systems involve making complex decisions [33]. Thus, strategic frameworks are essential for reconfiguration design [34, 35]. This paper proposes a strategic decision framework based on a combination of methodologies that generate ideal reconfigurable manufacturing products, which is the goal of reconfigurable manufacturing systems. The reconfigurable manufacturing concept can help to improve the performance in systems that require high functionality and scalable capacity [4, 5, 13, 14, 19, 31]. It conceives a manufacturing system where machine components, cells, or material handling units can be added, removed, modified, or exchanged to respond quickly to changing requirements [36, 37]. For a manufacturing system to be readily In a reconfigurable manufacturing system, there are specific features that have to be included [38], comprising (a) modularity of component design, (b) integrability allows to include new technologies, (c) convertibility to allow quick changeover between products and quick system adaptability for future products, (d) diagnosability is the crucial characteristic to detect problems in quality or consistency, (e) customization is integrated to achieve the capability and flexibility characteristics, and (f) scalability to incrementally change the product position in the market rapidly and economically. Reconfigurable Manufacturing Systems (RMS) are the main structure that provides a system with a flexible structure and design focus [39,40,41]. Highly productive, cost-effective systems are created by (a) part-family focus and (b) customized flexibility that enables the simultaneous operation of different tools [38]. RMS is designed to manage situations where productivity and system responsiveness are vital. The Integrated Product, Process, and Manufacturing System Development (IPPMD) reference model [25, 42] is another approach to designing reconfigurable systems. It uses a reference map comprising stages (ideation, essential development, advanced development, and launching) and the entities, product, process, and manufacturing system development. This map can also be used to identify the product, process, or manufacturing scope of the product and its developed and executed stages. IPPMD could be used for implementing interconnected systems that are required in this digital era. For example, products that require smart, sensing, and sustainable characteristics can be designed using this methodology so that the enterprise integrates economic impact, social understanding of the community's needs, and preservation of the natural environment. Designers must consider integrated product characteristics so that designed products can change dynamically. A 3D food printer design that shows a huge potential to solve nutritional problems based on IPPMD allows consumers to change their diet according to their personal and health requirements [41]. This work shows how a 3D food printer could fulfill a community's nutritional and economic needs. Moreover, some agricultural problems also could be solved using the IPPMD methodology since the 3D food printer could create nutritious food-mixing components [41].

Greenhouses are an essential component of crop production to address the planet's critical food problems [17]. With greenhouse technologies, it is possible to cultivate all horticultural species in any region of the world, provided that the greenhouse is appropriately designed and equipped to control the climatic parameters [43]. Worldwide, the main greenhouse vegetable production areas include Spain, the Netherlands, Mexico, Canada, and the United States. Production in Mexico and Spain consists of various production systems ranging from low to high-technology greenhouses.

Production in Europe and America consists primarily of high-technology greenhouses with significantly higher yields [14]. To compete in international markets, countries must maintain the cultivated crop’s quality and quantity throughout the year. Maintaining a greenhouse with a functional mechanical structure and an optimal control system is essential to achieve this objective [44]. One solution for this requirement is reconfiguring to find optimal resources per the priority variables while maintaining the system’s functionality and capacity.

This paper presents a reconfigurable greenhouse composed of a modular mechanical structure that can be reconfigured to obtain the necessary physical properties to operate in different food production systems and the control system. This greenhouse has mechanical properties that can be adapted for various greenhouse configurations that, with an optimal control system, can achieve crop needs regardless of external variables. Hence, this paper contributes to generating a strategic-decision framework that includes reconfiguration, which increases product flexibility and greenhouse performance compared to a conventional one. This proposal aims to increase the utilization of reconfigurable systems and the strategic decisions that systematically guide the design process of reconfigurable systems. Generally, reconfigurable systems emerge from frameworks that guide the selection of their elements according to what is required. However, the criteria boundaries and hierarchies are not always integrated correctly, so these frameworks lack a systematic structure for integrating hierarchies and boundaries and, most importantly, a decision engine based on fuzzy logic, ensuring a successful reconfiguration system [45,46,47,48].

In addition, this paper describes a complete framework for designing an advanced greenhouse as a reconfigurable production system. This kind of greenhouse can increase capacity and functionality across a food product family and, therefore, can create food products affected by COVID-19. Usually, this redesign process is based on rearranging or changing hardware and software components to fulfill consumers' needs. The ability to achieve this conversion efficiently determines the success of the production system. Moreover, the reconfiguration improves the flexibility of the greenhouse. Hence, a strategic decision framework (SDF) is fundamental for correct decision-making in product design. This proposal opens a complete alternative that can be used in food logistics 4.0, in which protected agriculture is crucial to supply food on time.

This paper is structured as follows: Sect. 2 describes the proposed strategic decision framework. The proposal consists of defining the domains of the IPPMD and establishing the criteria, hierarchies, and dendrograms. The Fuzzy Cluster Meaning (FCM) technique integrates the decision engine, and the Fuzzy Goals, Constraints, and Decisions are also defined in this stage. In Sect. 3, a case study for a reconfigurable greenhouse is presented. Section 4 introduces the control library prototype. In the end, Sects. 5 and 6 show the discussion and conclusions.

2 Strategic decision framework for the design of reconfigurable agri-food production systems

The proposed strategic decision framework (SDF) is based on the diagram presented in Fig. 1. As seen in the diagram, the reconfiguration process begins with defining a particular system to be developed using the IPPMD reference model to find the product domains [49]. The first stage is based on detecting the primary consumer, structure, and reconfigurability domains. Also, this stage can include the product life cycle concept. Then, criteria boundaries and hierarchies are used for defining dendrograms. After that, the FCM is used to construct clusters that include the criteria and hierarchies needed in the product reconfiguration. Finally, the Fuzzy Logic decision is implemented to define reconfigurable manufacturing products.

Fig. 1
figure 1

Diagram for a strategic decision framework (SDF)

This paper's SDF presented only applies to designing the proposed reconfigurable greenhouse's mechanical structure. The reconfigurable software platform (control system) is based on an open library [4]. The control library possesses digital programs that provide adequate responses under various conditions. The control platform handles extreme conditions in which the controllers run safely. However, the control system can be designed using the proposed framework. An advantage of implementing the proposed framework based on IPPMD is that previous models can be reused, so partial or complete models can be configured and integrated into the design process, reducing the time to design new products. The reconfigurable requirements could be included so the previous knowledge of each designed section is incorporated, and failures during the previous design stages could be considered. The previous knowledge for making decisions is reduced since FCM can describe a hierarchical structure that provides helpful information for designing products. The framework handles the consumers' needs that dynamically change so an updated product can be generated.

The reconfigurable control library focuses on different algorithms for controlling the micro-climate variables such as greenhouse temperature or humidity. Each part of Sect. 2 below describes the strategic decision framework, followed by the design stages, presented consecutively when the advanced greenhouse is designed.

2.1 The integrated product, process, and manufacturing system development (IPPMD) reference model

The strategic decision framework’s first step involves functionality, reconfigurability, and defining the customer's domains.

The IPPMD reference model has been developed for enterprises working on one or many product lifecycle stages [49]. This includes three entities: product, process, and manufacturing system. The main definitions of the IPPMD reference model are:

  • Project definition: identify the project requirements and process path, verify process path information, and tollgate: concurrent map.

  • Partial model definition: activity breakdown and selection, activity, resource, organization and information model selection, tollgate: partial model.

  • Particular model definition: company evaluation, tollgate: specific model.

This work uses a reconfigurable agri-food production system within an SDF. The design is conducted according to the product demand stages in the matrix proposed by [42], which begins with the product design idea and ends with the product prototype. The matrix of entities and stages is adjusted for the greenhouse as an agri-food production system (see Fig. 2). The work proposed focuses on the following stages: the greenhouse idea, concept design and target specification, detailed greenhouse design, and prototype. The IPPMD reference model is used in the proposed framework for defining all the domains needed in the reconfiguration process.

Fig. 2
figure 2

The matrix of entities and stages

2.2 Criteria, hierarchies, and dendrograms

After defining the domains, the criteria needed in the reconfiguration have to be considered. The proposed framework includes the principle of similarity in the reconfiguration design area: the reference for selecting the criteria and hierarchies. The stages to perform the product reconfiguration are:

  1. (1)

    Define the criteria and alternatives.

  2. (2)

    Develop the hierarchical methodology.

  3. (3)

    Perform analysis based on dendrograms.

The requirements of the product must be considered to design the matrices in RMS. Those requirements are provided by the IPPMD reference model so that the hierarchical classifications can be done. The matrices show the product's similarities in modularity, commonality, compatibility, reusability, and demand [50]. Each matrix is defined below.

Modularity is considered a key attribute of RMS and is essential for implementing customized and complex products.

Commonality can be defined as a measurement of how well the product uses standardized parts, and it ensures that two or more products of the same family share a common component. The similarity between pairs of products (p,q) is measured with Jaccard's similarity coefficient.

Compatibility measures the degree to which different products can be joined to form a family of similar products. It can be calculated using two matrices: one for measuring technological compatibility and the other for marketing.

Reusability shows the existing product components to manufacture a new product type. Reusability can be maximized by arranging products and assigning them to families of similar products.

Product demand: The elements of a homogeneous system configuration should have a similar capacity, and the system capacity should have the highest possible utilization rate to obtain a cost-effective system configuration.

Each matrix's results are represented by dendrograms that illustrate the relationship in a product family by grouping products.

The most popular method to set the hierarchies is the Analytic Hierarchy Process (AHP). The criteria are rated by importance on a nine-point scale, one being the most important and nine being the least important. The AHP method's advantages include assessing the consistency of the decision maker’s rating, and it allows for sensitivity analysis [50].

In this paper, the information is obtained using the Super Decision® program. With this method, it is possible to get enough information to use a Fuzzy Cluster Means (FCM) methodology. Since the purpose of FCM is to calculate clusters represented by their centers, each center has a maximum Euclidian distance from the others, and the FCM can provide a Euclidian-distance criterion to define the location of the members of the product family in a cluster.

2.3 Fuzzy cluster meaning

The RMS matrix does not give a complete set of criteria for decision-making when hierarchies are taken into account. Hence, the results of AHP are used in the FCM to get Fuzzy Clusters that can establish a relationship between several hierarchies. In an optimization field, fuzzy logic obtains advantages from its properties. Fuzzy Clustering Means can get the optimal data clustering [51]. The FCM requires a cost function to optimize the Euclidian distance between the centers and elements in each cluster [52]. The methodology presented for FCM is well known and has been presented in several papers, such as [51, 52]. The input is partitioned, and c is the number of partitions or clusters. The partition is defined by fuzzy subsets (\(U_{i}\)). Two conditions must be satisfied when FCM is deployed.

$$ \sum\limits_{i = 1}^{c} {U_{i} (x_{k} ) = 1,\;\forall x_{k} \in X} $$
(1)
$$ 0 < \sum\limits_{k = 1}^{n} {U_{i} (x_{k} )} < n $$
(2)

Equation (1) defines that each element has a fuzzy value. Thus, adding up all the membership values in each subset must be equal to one. The second condition determines that every cluster must have at least one element and cannot integrate all elements in the data collection. This condition is essential because if there are no elements in a cluster, the cluster disappears. As a result, \(c = [2,n - 1]\) is the number of clusters that FCM returns.

Fuzzy Clustering Means needs to find the centers of that fuzzy cluster. Let \(v_{i} \in \Re^{p}\) be the vector point representing the center of the ith cluster. Then:

$$ v_{i} = \frac{{\sum\nolimits_{k = 1}^{n} {\left[ {U_{i} (x_{k} )} \right]^{m} x_{k} } }}{{\sum\nolimits_{k = 1}^{n} {\left[ {U_{i} (x_{k} )} \right]^{m} } }},\;\forall i = 1,\;...,\;c $$
(3)

FCM is a recursive algorithm that needs an objective function that estimates the optimization process. The objective function \(J_{m} (P)\) with the grade \(m\) of the partition \(P(X)\) is defined by Eq. (4):

$$ J_{m} (P) = \sum\limits_{k = 1}^{n} {\sum\limits_{i = 1}^{c} {\left[ {U_{i} (x_{k} )} \right]^{m} \left\| {x_{k} - v_{i} } \right\|^{2} } } $$
(4)

This objective function represents how distant the centers are and how the elements in each center are adjacent. For instance, the smaller the value \(J_{m} (P)\), the better the partition \(P(X)\). In these conditions, the target of FCM is to minimize the objective function. Then, the FCM algorithm is used to solve the clustering data. At first, a value has to be selected \(c = [2,\;n - 1]\), knowing the data collection \(X\). Then, we have to select the fuzzy parameter \(m = (1,\;\infty )\). In the initial step, a partition \(P(X)\) is selected and proposed randomly \(J_{m} (P) \to \infty\). Then, the algorithm calculates all cluster centers by Eq. (4). Then, it updates the partition by the following procedure for each \(x_{k} \in X\) calculation [51, 52]:

$$ U_{i} (x_{k} ) = \left[ {\sum\limits_{j = 1}^{c} {\left( {\frac{{\left\| {x_{k} - v_{i} } \right\|^{2} }}{{\left\| {x_{k} - v_{j} } \right\|^{2} }}} \right)^{{\frac{1}{m - 1}}} } } \right]^{ - 1} ,\;\forall i = 1,\;...,\;c $$
(5)

The algorithm derives the objective function and is compared with the previous objective function value. If the difference between the value of the last and current objective functions is close to zero (\(\varepsilon \ge 0\)), the stop criterion is reached, so the algorithm stops. If the stop condition is not reached, the algorithm recalculates the cluster centers and continues, where \(n = \left[ {2,\infty } \right)\) \(m = \left[ {1,\infty } \right)\) U are matrixes with the membership functions from every data set sample to each cluster center.

The FCM algorithm could be defined by five steps [51, 52]. Step 1: Initialize time \(t = 0\); Select numbers \(c = [2,\;n - 1]\) and \(m = (1,\;\infty )\).

Initialize the partition \(P(X) = \{ U_{1} ,...,U_{c} \}\) randomly. Set \(J_{m} (P)^{(0)} \to \infty\) Step 2: Determine cluster centers by Eq. (3) and \(P(X)\); Step 3 Update the partition by expression (5); Step 4 Calculate the objective function \(J_{m} (P)^{(t + 1)}\) with Eq. (4); Step 5 If \(J_{m} (P)^{(t)} - J_{m} (P)^{(t + 1)} > \varepsilon\) then, update \(t = t + 1\) and go to Step 2. Else, STOP.

2.4 Fuzzy goals, constraints, and decisions

A set of constraints and alternatives are evaluated using a performance function when a decision-making system is evaluated. The framework that can be defined using a fuzzy environment can be constructed [53]. Explicitly, let X = {x} be the set of alternatives. A fuzzy goal, G, in X will be identified with a given fuzzy set, G in X. In the conventional approach, the performance function associated with a decision process defines a linear ordering of the set of alternatives. A fuzzy goal’s membership function, µ(x), serves the same purpose. It may be derived from a given performance function by a normalization, which leaves the linear ordering unaltered. Such normalization provides a common denominator for the various goals and constraints, making it possible to treat them. This is one of the significant advantages of conceiving a goal as one of the principal components of a conceptual framework for decision-making in a fuzzy environment. An essential aspect of the above definitions of goal and constraint is that both are defined as fuzzy sets in the space of alternatives. Thus, as elaborated below, they can be treated identically in formulating a decision.

In contrast, in the conventional approach to decision-making, a constraint set is considered a non-fuzzy set in the space of alternatives X, whereas a performance function is a function from X to another space. Nevertheless, even in the conventional approach, the use of Lagrangian multipliers and penalty functions makes it apparent that there is an intrinsic similarity between performance functions and constraints. Then, a decision is a choice or a set of options drawn from the available alternatives.

If a fuzzy goal G and fuzzy constraint C in the space of alternatives X are defined, G and C can be combined to form a decision, D is a fuzzy set resulting from the intersections of G and C according to the Eq. (6).

$$ D = G \cap \,C $$
(6)

And correspondingly, the membership values

$$ \mu_{D} = \mu_{G} \wedge \mu_{C} $$
(7)

Generally, if it is assumed that we have n goals G1,.., Gn and m constraints C1,………., Cm. Then, the resulting decision is the intersection of the given goals G1…, Gn, and the given constraints C1, …., Cm (Eqs. 8 and 9).

$$ D = G_{1} \cap G_{2} \cap \, \ldots \; \cap G_{n} \cap C_{1} \cap C_{2} \cap \; \ldots \; \cap C_{m} $$
(8)
$$ \mu_{D} = \mu_{{G_{1} }} \wedge \mu_{{G_{2} }} \wedge \ldots \wedge \mu_{n} \wedge \mu_{{C_{1} }} \wedge \mu_{{C_{2} }} \wedge \ldots \wedge \mu_{{C_{m} }} $$
(9)

3 Case study: the reconfigurable greenhouse

The greenhouse design begins by becoming familiar with the crop characteristics, such as the greenhouse location and the regional climate. The drawings of structures are used in the hierarchical and FCM (Fuzzy Cluster Mean) methodology. The criteria and alternatives are defined according to the literature review and the existing greenhouse structures. The requirements' information presented in [54] is proportionate by the customer. The greenhouse’s requirements for their manufacture are shown in Fig. 3, and it is also presented the main elements in the reconfiguration of the greenhouse; in addition, the basic concepts of building and designing a greenhouse are illustrated. The reconfiguration's primary goals are to relate different elements, control the micro-climate, and obtain an excellent product for the entire year. The diagram for reconfiguring the hardware and software in the greenhouse is illustrated in Figs. 1 and 4 shows the interaction between the proposed mechanical and digital controller structure.

Fig. 3
figure 3

The main elements in the reconfigurable greenhouse

Fig. 4
figure 4

Interaction between the mechanical and controller structures proposed

3.1 Hierarchical clustering matrix construction

The product parts matrix shown in Table 4 was constructed corresponding to the dimensions of the greenhouse structure. The mechanical structures selected were Zenith-Tunnel, Chapel, Sawtooth, Tunnel, Multi-tunnel, Parral, Chinese Hat, and Butterfly, shown in [55]. The diagrams of all the structures were made to obtain the dimensions and quantity of the standard tubes to create the data matrix, which is presented in Table 1. The matrix in Table 4 is also composed of n products (different structures of the greenhouse) i = (A, B, C,…,n) and m components of the structure (tubes) parts divided by length j = (1, 2, 3, …., n), rows and columns, respectively. The values in the matrix (aij) are set according to the following condition: If the product (i) requires a similar part to (j), the value is set to the number of components that have the same length. Zero is set when a non-similar element is found. Using this information, it is possible to construct the following array structures: hierarchical modularity, commonality, compatibility, reusability, and product demand. The hierarchical clustering methodology's output is a dendrogram that presents different sets of product families that can be selected based on similarities among the products that comprise those families. Table 1 shows the product part matrix.

Table 1 Product part matrix

The reconfiguration criteria are solved using the method proposed by [50]. Below, the procedures for solving the reconfigurable criteria are presented.

Modularity is calculated using Eqs. (10) and (11).

$$ M = \frac{{\phi_{p} }}{{\phi_{p} }} = \frac{{\text{Common elements}}}{{\text{Total elements}}}\;\;0 < \, M < 1 $$
(10)
$$ S_{pq} = 1 - \left[ {Mp - Mq} \right]\;\;0 < S_{pq} < 1 $$
(11)

where M = Modularity product, p, q = products, S = similarities.

With the information in Table 4, an example of modularity is shown for the Zenith structure:

$$ \begin{array}{*{20}c} {Mp = \frac{9}{13}} & {Mq = \frac{6}{16}} \\ \end{array} $$
$$ S_{pq} = 1 - \left[ {{0}{\text{.692308}} - 0.375} \right] = 0.682692 $$

The commonality is calculated using Eq. (12).

$$ J_{pq} = \frac{a}{a + b + c}\;\;0 < J_{pq} < 1 $$
(12)

where a indicates the number of parts that form both products p and q, b stands for the number of parts that form product p but not product q, and c is the number of parts that form product q but not product p.

The following example presented below is developed for the Zenith structure

$$ J_{pq} = \frac{3}{3 + 3 + 1} = 0.428571 $$

Compatibility is calculated using Eqs. (13) and (14).

The criterion has the following options: not compatible, slightly compatible, compatible, very compatible, and highly compatible. The coefficients i and j are for two different products. Their compatibility coefficients in the matrix (aij) are defined by 0 < aij < 1. Reusability is naturally included in the definition of compatibility. Reusability between products is described below.

$$ R_{pq} = \frac{{\gamma_{pq} }}{{\lambda_{pq} }}\;\;0 < \, R_{pq} < \, 1 $$
(13)
$$ \Lambda_{pq} = \frac{{R_{pq} + R_{qp} }}{2}\;\;0 < \Lambda_{pq} < 1 $$
(14)

Rpq = Reusability between products p and q, \(\gamma_{pq}\) = number of components of product p shared with product q, \(\lambda_{pq}\) = the total number of components of product p, \(\Lambda_{pq}\) = coefficients of the reusability matrix.

$$ R_{pq} = \frac{3}{9}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} ;{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} R_{qp} = \frac{3}{8}{\kern 1pt} $$
$$ \Lambda_{pq} = \frac{0.33 + 0.37}{2} = 0.35 $$

The Demand product is calculated using Eq. (15).

$$ D_{pq} = 1 - \frac{{\left| {d_{p} - d_{q} } \right|}}{{d_{\max } - d_{\min } }}\;\;0 < \, D_{pq} < 1 $$
(15)

where Dpq is the interaction value between products p and q, dp is the demand of product p, dmax is the maximum value of dp, and dmin is the minimum value of dp.

$$ D_{pq} = 1 - \frac{{\left| {3 - 2} \right|}}{5 - 1} = 0.75 $$

Table 2 shows the results of the modularity criterion for the greenhouse. The results are used to draw the dendrogram corresponding to the specific criteria for reconfiguration, as shown in Fig. 5.

Table 2 Modularity Matrix
Fig. 5
figure 5

Dendrogram for Modularity-

The results for each greenhouse’s reconfigurable criterion are:

  • The structure with the highest modularity value is the Tunnel, which is the basis for reconfiguring the greenhouse structures with semi-circular ceilings, versus the Chapel type, which is the least supported.

  • In the commonality analysis, the Tunnel structure has the highest values in common, followed by the Zenith structure. The Parra structure has the lowest value of commonality.

  • In compatibility, the most compatible is the Multi-tunnel, and the least compatible is Parral, followed by Chapel.

  • The Butterfly has the best reusability of parts, and the next is the Tunnel. The structure that has fewer reusable parts is Parral, followed by the Chapel.

  • The elements to be compared have no difference in market demand; all the structures have the same demand, except Chinese Hat and Multi-tunnel, which only have 75% demand.

3.2 FCM and weighting method

The FCM method allows for the creation of clusters according to the reconfiguration criterion selected. For instance, if FCM is used for generating two clusters that correlate: commonality (y-coordinate) and modularity (x-coordinate) in the structure of the greenhouse.

A complete graphical description of the location of the greenhouse structures can be obtained in Fig. 6. Moreover, the three structures (Parral, Sawtooth, and Chapel) are close so that they can be easily reconfigured. The cluster in the middle includes four structures, and the last cluster only has one (Tunnel). The distance assigns a membership value to every structure, using Eq. (5). This value can be selected for converting one structure to another. For instance, the Tunnel structure is an option for being converted to the Chapel. So, it is easy to reconfigure from Butterfly to Chapel or Butterfly to Tunnel.

Fig. 6
figure 6

Commonality and Modularity with FCM analysis

The number of reconfigurable criteria can increase; for instance, the analysis of three criteria to determine the most compatible and feasible greenhouse structure for the reconfiguration can be performed (Fig. 7).

Fig. 7
figure 7

Compatibility, Commonality, and Modularity with FCM analysis (the centers for each cluster are marked with

symbols *, ∆, +).

The fuzzy decision can be calculated using the matrix U for compatibility, commonality, and modularity (Eq. 5).

Table 3 shows the partition U-matrix for the greenhouse structure.

Table 3 Partition U-Matrix

The next step is to obtain the minimum value for each criterion in Table 3 (compatibility, commonality, and modularity) and then choose the maximum value (see Table 4).

Table 4 The maximum value for all greenhouse structures

The maximum value in Table 4 is 0.0707, which corresponds to the Butterfly greenhouse. So, Butterfly is the best option for the three reconfigurable criteria selected (compatibility, commonality, and modularity). The Butterfly structure is an adequate alternative; thus, this structure is the reference product for reconfiguring from one structure to another.

4 Digital control library

This paper also proposes an open architecture to maneuver the control system. Thus, those controllers are integrated into a library. A graphical program was used to design the digital controllers.

The autonomous library has three modes: time, decision tree, and fuzzy logic control. Also, artificial neural networks were integrated. The Control and Supervisor library ensures minimum energy consumption and protects the entire greenhouse structure against abrupt climate changes, specifically rain and wind.

The operator applies the manual controller to use the computer keyboard for turning the systems off and on. The decision tree controller is based on a series of pre-programmed decisions based on the customer’s setpoints. The Fuzzy Logic Controller runs an automatic controller [56], a PD (Proportional–Derivative) control. The proposed climatic controller decides on an action, combining the main variables.

The complete control structure is presented in Fig. 8, in which the software system is introduced (control unit). The structure includes a shade system, a fog system, a vent system, a nutrient supply, an exhaust fan, a hydroponic technique, and digital acquisition of variables such as PH, temperature, humidity, level, and light.

Fig. 8
figure 8

Control unit for the greenhouse prototype

The first approach resulted in a reconfigurable greenhouse that was constructed to change its structure when required by the crop. It is shown in [55]. With the previous information, the reconfigurability proposal allows the greenhouse to change into Tunnel type, Zenith, Multi-tunnel, Chinese Hat, or Butterfly, according to the FCM and dendrogram results. The dimensions of the prototype are 10 m long by 10 m wide, which results in a growing area of 100 m2. The height of the sidewalls is 3 m, and the height of the upper point is 5.6 m.

Besides, as mentioned, several control strategies were pre-loaded into the control library programmed in LabVIEW. Each control strategy could be combined according to the physical structure of the greenhouse. For instance, when the uncertainty in the internal environmental conditions was high, a robust controller could be deployed in which upper and lower bounds are defined according to the time and frequency response required (Fig. 9).

Fig. 9
figure 9

Track Bounds

The design of the robust controller is implemented using the temperature greenhouse model. The equation in terms of temperature is described as the transfer function shown in Eq. (16)

$$ H_{s} = \frac{ - 95.59s + 41.97}{{3851s^{2} + 471.8s + 1}} $$
(16)

As mentioned before, the greenhouse presents uncertainties in the real world due to the rise of temperature, errors in the sensors and actuators, and unknown dynamics. The upper and lower tracking bounds for desired control are shown in Fig. 9. The desired control time specifications for the closed-loop temperature control are maximum overshoot, 5%, and a settling time of 1200 s due to high temperature, which can cause damage to the crop. In Eq. (17), the uncertainty parameters are considered equal to one plus or minus 50% as follows:

$$ \tau = H_{s} = \frac{{\left[ { - 143.3 - 47.79} \right]s + \left[ {20.98\,\,62.95} \right]}}{{\left[ {1925.5\,\,5776.5} \right]s^{2} + \left[ {235.9\,\,707.7} \right]s + 1}} $$
(17)

The array of frequencies of interest that are used to the frequency-domain methodology are proposed according to ω = [0:0002 0:0004 0:0009 0:0017 0:0034 0:0067 0:0099], the array of frequencies calculation of the 16 plants (Fig. 10).

Fig. 10
figure 10

Bode diagram of the plant with uncertainty

The desired control conditions and the augmented tracking bounds are defined in Eqs. (18) and (19), respectively, as follows:

$$P_{U} (s) = \frac{ - 143.4s + 62.95}{{1926s^{2} + 235.9s + 1}}$$
(18)
$$ P_{L} (s) = \frac{ - 47.8s + 20.98}{{5777s^{2} + 707.7s + 1}} $$
(19)

The projection of the transfer function shown in Eq. (17) onto the Nichols chart, taking into account each frequency of interest and considering each parameter within the uncertainty, is shown in Fig. 11.

Fig. 11
figure 11

Nichols chart

Figure 11 is used to select the nominal plant. The nominal plant is a designed plant within the model uncertainty as defined in Eq. (20)

$$ P_{N} (s) = \frac{ - 143.4s + 20.98}{{1926s^{2} + 707.7s + 1}} $$
(20)

Quantitative Feedback Theory (QFT) involves the information associated with the model uncertainty and the control requirements in a set of simple curves. The technique mentioned above allows for the use of the nominal plant to design the controller. The controller design is called loop shaping, carried out on the Nichols chart. The loop shaping technique adds poles and zeros until the nominal loop lies near its bounds, as is shown in Fig. 12. The Eq. (21) and the theoretical plant are transfer functions considered in the loop shaping sequence, as shown in Fig. 12.

$$ L_{01} (s) = \frac{1}{{s^{2} + s}} $$
(21)
Fig. 12
figure 12

Sequence to shape nominal loop L0(s)

The controller design follows the blue line that divides Fig. 12d. The controller is expressed according to the following transfer function.

$$G(s) = \frac{{18.49s^{2} + 3.397s + 0.006}}{{1.343e04s^{4} + 1.444e04s^{3} + 1041s^{2} + 33.58s}}$$
(22)

The temperature control is considered a tracking problem, so a good practice is to use a prefilter. The prefilter is established to meet reference tracking while the feedback controller deals with the uncertainty and improves stability. The prefiltered proposed is defined in Eq. (19) and is shown in Fig. 13.

$$ F(s) = \frac{1}{333.3s + 1} $$
(23)
Fig. 13
figure 13

Bode diagram to design the prefilter

After the controller and prefilter design, a validation is proposed to analyze the controller's performance. Thus, the controller and prefilter are discretized and implemented on LabVIEW FPGA in the greenhouse system's control unit, as shown in Fig. 14.

Fig. 14
figure 14

Robust controller programmed in LabVIEW

A set of uncertainty is simulated and applied to the transfer function of the greenhouse system. Figure 15 shows the controller response.

Fig. 15
figure 15

Controller response

Finally, the reconfiguration of the structure and controllers allows the designers high flexibility when they design the reconfiguration. The design requirements are archived in the reconfigured greenhouse response.

5 Students’ activities

This section presents a general idea about some tasks students developed during the greenhouse operation. This section does not intend to study the learning process using the greenhouse. However, it is essential to mention that the greenhouse was developed to be managed and coordinated by academic mentors and students at Tecnologico de Monterrey. Since the greenhouse is an autonomous system, students’ activities centered on maintaining the greenhouse, monitoring the environmental conditions, evaluating the database according to the crop harvesting requirements, and other things (Fig. 16).

Fig. 16
figure 16

Students preparing the greenhouse for harvesting a new crop, collecting data, and an academic mentor

Also, undergraduate students were able to develop, implement, and assess new digital controllers that could be added to the controller library. The students also monitored the crops throughout the process to detect anomalous conditions. They stored a database that could predict the benefits of specific structures and controllers to be implemented. A specific simulator was designed for in LabVIEW to validate controllers. Then students can deploy the proposed controllers using the control system unit (Fig. 17). In addition, since the simulator and the control unit can be accessed online, remote connections are permitted to limit COVID-19 circulation, which requires social distance.

Fig. 17
figure 17

a Basic simulator program using LabVIEW to evaluate the climate controller, b nutrient controller, and c simulator frontal panel

6 Discussion

The strategic decision framework for designing reconfigurable agri-food production systems is a novel tool that does not need an expert in manufacturing design to make decisions about reconfiguring a product. The novice designer can use it. Although the proposed methodology is based on a well-known structure (IPPMD), it integrates novel features that allow decision-making during the design process. This is the first design approach for reconfigurable products using fuzzy logic clusters and hierarchical structures. As a result, the design process is more flexible because the greenhouse requirements are determined, and the type of structure and controller are designed simultaneously to find a suitable design alternative. This design method is iterative but can converge to achieve the structure and controller. It can be a handy autonomous or semi-autonomous methodology for implementing an advanced greenhouse in universities.

In the case of an advanced greenhouse with reconfigurable characteristics, the number of requirements increased because each structure had to comply with internal environmental conditions. Those conditions were determined according to the type of crops, so the selections of materials and controllers were not accessible. When different products are in a selected family, SDF can deal with reconfiguration factors to find the best alternative, improving the greenhouse's performance. The FCM shows clusters with similar elements for generating a reconfiguration product based on different criteria. The hierarchies and chosen conditions determine the location of the products. Although some research papers deal with reconfigurable systems, few cover the complete reconfiguration process that describes both the customer and product domains.

Moreover, hierarchies are included in the analyses, so the decisions consider the influence of each factor. FCM and Fuzzy Logic for making decisions are implemented in the last part to combine different elements and arrive at the decision that allows the best alternative to be selected, which increases the greenhouse's performance. Reconfiguration is not a trivial process, and making decisions regarding the selection to generate reconfigurable products is difficult. Hence, this paper offers a framework that integrates decision data for designing a reconfigurable system. Also, this paper presents the possibility of using the SDF to design a reconfigurable greenhouse. An open library is used for the digital controllers; however, the SDF can be used for the controllers and structures of a greenhouse.

Future work could analyze the software with SDF if several digital platforms (FPGAS, DSP, micro-controllers) are analyzed to implement different controllers. One of the main advantages of SDF is presenting the designer with a methodological process to validate the reconfigurable design. When the number of hierarchical factors increases, FCM allows calculating the membership values in fuzzy clusters. The fuzzy decision selects the best alternative. The greenhouse is a complex system that is used for validating the SDF. The SDF for reconfigurable agri-food production systems design is a general framework that can be adjusted to different products and systems.

7 Conclusions

A strategic decision framework for designing reconfigurable agri-food production systems was proposed to support decision-making about reconfigurable products in different product families. The IPPMD and RMS methodology analyses were integrated into the framework so students could learn from this system as a living lab. The hierarchical matrices, dendrograms, FCM, and Fuzzy decisions were included in the framework to have a complete study. These methodologies allow grouping the products (greenhouse types) with common elements when several reconfiguration criteria are considered in the analysis. This framework simplifies the purchase and choice of the materials needed to develop a reconfigurable product.

Additionally, the framework includes an open-architecture controller, which is presented as a software library. The open architecture integrates supervisory control and a set of reconfigurable controllers. The set of controllers is comprised of intelligent control tools, classical control tools, and robust control tools. This reconfigurable greenhouse case study validated the proposed framework. The validation of the robust controller design was illustrated using several presented uncertainties. Although the proposed design methodology was only implemented in one reconfigurable greenhouse, the case study results showed that the framework could increase efficiency when reconfiguring an agri-food production system. The efficient selection and choice of material methodology are helpful because the proposed framework offers analyses for the best decision-making and focuses on outstanding solutions. Hence, this case study showed that the reconfiguration process was efficient and productive. Finally, the framework proposed is a promising solution for the design of several reconfigurable products.