1 Introduction

Total-Hip Arthroplasty (THA) is a surgical process carried out to remove damaged parts of the hip joint. In this typical “ball and socket” joint, the head of the femur (or artificial stem) is considered as the ball and the pelvic cavity (or the artificial cup) as the socket. The excised parts of the joint are the femoral head and the spherical cavity of the pelvic bone, and both are replaced with artificial implants. The prevalence of THA is estimated to be 87 per 100 000 of the global population, and this value is expected to rise by 40% by 2030 [1]. Almost 59 000 hip replacements were performed in Canada in 2017–2018. Comparing the 2017 and 2019 available reports on the number of hip-replacement surgeries, an increase of 17.4% can be seen over the four years 2015–2019. More than 9700 hip-revision surgeries were performed in 2019, with 15.1% of these being needed to repair complete dislocations (failure), leg-length disparities, and implant loosening [2, 3]. One of the most important parts of a THA surgery is cup positioning and orientation [4] to reduce the risk of later impingement or hip dislocation. The widely adopted guideline for the cup orientation is the Lewinnek safe zone [5]. However, this metric was shown to have minimal correlation with the risk of hip dislocation [68], which also depends on factors such as pelvic tilt (PT) and spine flexibility that are ignored by the Lewinnek guidelines. Considering the spine for lower-limb motion analyses might at first glance be seen to require excessive work for only negligible outcome, but a look at the increasing number of patient complaints after THA surgeries [3] highlights the importance of considering other factors like the spine stiffness, pelvic motion, and spinal fusion in lower-limb dynamic analysis. Recent clinical evaluations on those who have had THA show increased rates of dissatisfaction after THA, indicating that relying on the traditional Lewinnek safe zone [5], which does not consider the effect of pelvic tilt and different spinal conditions, is not practical for all patients [6, 9, 10]. It appears that, for optimal cup positioning and orientation during the THA, not only the lower-limb dynamics but also the effects of the spine on lower-limb motion must be considered [9]. Different spinal conditions and stiffness have a direct effect on THA surgery; if the spine is too stiff or rigid, the prosthetic implant may not be properly aligned or seated, leading to joint instability, pain, and even implant failure [6]. Additionally, a stiff spine can limit the range of motion of the hip joint, resulting in decreased function. Therefore, it is important to assess spine stiffness prior to THA surgery to ensure the best outcome. Thus, surgeons should consider different spine types and their effects on lower-limb motion in their preoperative planning. The more flexible the spine, the greater contribution it has in daily activities [6]. Currently, surgeons use lateral X-ray images of the spine and pelvis, usually from standing and sitting postures, to plan the THA surgery [11, 12]. Relying only on these two X-ray images might not be sufficient to obtain the spine stiffness, since it cannot be easily evaluated using static X-ray from two stationary positions. Thus, we are motivated to propose a dynamic-motion analysis as an alternative approach to move from stationary X-ray image analysis to a full dynamic-motion analysis before and after THA surgery, which includes spine-stiffness evaluation. The following paragraphs explain different reasons for spinal stiffness, the current surgical approach to include the spine, and how using a predictive dynamic model can improve THA surgery outcomes.

Individuals with stiffer spines (restricted spinal-joint angles), which may arise from spinopelvic abnormalities, spinal-fusion surgery, and aging, will have different spinal dynamic behaviors during daily activities such as sit-to-stand motion. Researchers have explored approaches for automatic extraction of spinopelvic metrics and their effect on lower-limb dynamics [13, 14]. In cases of stiff spines, some surgeons consider modifying the implant position and orientation (categorizing patients and providing qualitative modifications tailored to each category) in order to incorporate the effect of the stiffer spine [9, 15]. However, the exact mechanisms involved and their influence on an operation’s outcome have not yet been clarified [16]. Therefore, a quantitative analysis that suggests patient-specific implant orientation becomes necessary.

The main reason reported for changes in spinal stiffness is spinal-fusion surgery [1721]. However, spine disorders [19], and aging [22] are also reported to have some effect on the spine mobility, which is introduced as “late dislocation”. Recent research gave spinal-fusion surgery as the main reason for spine stiffness, which can affect the outcome of THA surgery [1820]. When a spinal fusion results in a fixed spinal alignment [8] or involves the sacrum and some levels of the lumbar spine, the risk of impingement increases as a result of excessive spinal stiffness [23]. In addition, changes in biomechanical properties of the spine elements (i.e., Intervertebral Discs (IVDs), ligaments, and muscles), which can be the result of aging or disc degeneration [2426], can result in different spine stiffnesses. Surgeons categorize their patients based on different spine–hip relationships and propose different anteversion/inclination angles for the implant-cup positioning and orientation according to these categories [9, 27]. Although these qualitative representations of different spine–hip relations help surgeons to consider different approaches for those who might have stiffer spines, they do not identify the underlying mechanism of how different levels of fusion, aging, or spine deformity can affect lower-limb motion. Computational models have emerged as powerful tools in predicting impingement risks and optimizing implant orientations. Recent research has delved into various aspects of impingement and dislocation in THA surgeries. One fundamental aspect is the need to predict dislocation stability for different positions of prosthetic components under various activities. Three-dimensional finite-element (FE) models have been proposed to assess the range of movement (ROM) and maximum resisting moment (RM) until dislocation, establishing a “safe zone” for impingement and dislocation avoidance [28]. Another critical consideration is the orientation of prosthetic components. Conventional guidelines like the Lewinnek safe zone have been criticized for their static assessment and lack of consideration of stem geometry. Research has aimed to determine optimal orientations for both cups and stems, taking into account various factors such as anteversion, neck-shaft angles, prosthetic-head size, and target ranges of movement [29]. Moreover, the type of implant system used in THA, including short hip stems and hip resurfacing, can influence the range of motion and the likelihood of impingement [30]. It is important to investigate how different implant designs impact impingement-free ROM. Further insights into THA impingement come from studies focusing on the interplay between cup and stem anteversions during hip motion. These investigations reveal that cup and stem anteversions have distinct effects on the position of the femoral head inside the acetabular liner during various activities, emphasizing the importance of considering both components to assess hip motion accurately [31]. Additionally, lumbar–pelvic stiffness and sagittal imbalance have been identified as factors contributing to dislocation and wear after THA. To address this concern, new mathematical algorithms have been proposed to determine patient-specific safe zones for THA components, integrating standing and sitting sagittal pelvic tilt to optimize implant orientations and prevent impingement [30, 32].

In this research, we present a predictive dynamic model for human motion simulation, aiming to bridge the existing knowledge gap in THA and enhance preoperative surgery planning. One of the main reasons for patient dissatisfaction or artificial hip-joint dislocation after THA surgery is implant impingement [33]. Given the prevalence of implant impingement or dislocation after THA during the sit-to-stand motion [34], which is a highly repetitive daily activity, our focus lies in the predictive simulation of this specific motion. We further investigate various scenarios involving a dynamic model of patients with different spinal conditions. This modeling approach has the potential to provide surgeons with numerical insights into the predicted dynamic motion beyond those given by static X-rays. Moreover, the forward dynamics method is used to simulate different scenarios and answer “what if?” questions in terms of spinopelvic and lower-limb motion. Note that the US Food and Drug Administration (FDA) have supported the use of computational models to improve medical-device performance [35]. By employing this parametric analysis using predictive models, surgeons can modify stiffness factors and directly observe the effects on lower-limb dynamic motion, which is an improvement from the general categorization and treatment advice outlined in [9, 19].

2 Method

2.1 Overview

The main components of the proposed methodology are presented in Fig. 1. To begin, a functional lumbar-spine unit is designed and modeled with nonlinear ligaments and intervertebral discs (IVDs). This model is then validated by comparing its range of motion with the literature in-vitro experiments. Subsequently, the validated functional unit is used to create a 10 degree-of-freedom (DoF) full-body human skeletal model in MapleSim [Maple, v 2022.2, Canada]. An optimal control based on a trajectory-optimization approach is then applied to this model to simulate human sit-to-stand motion. The joint angles generated by this simulation are validated with a motion-capture experiment. This predictive model is then used to identify the relative orientation of the femur and pelvis for different spinal conditions and spinopelvic stiffness. An optimization algorithm is employed to optimize the acetabulum implant to prevent impingement. Utilizing this framework, a novel patient categorization is used to propose different cup-orientation angles.

Fig. 1
figure 1

The framework of evaluating the effect of different spine conditions on lower-limb motion and obtaining optimal cup orientation to avoid implant impingement after THA

2.2 Biomechanical modeling of a functional spine unit considering nonlinear passive spine elements (ligaments and IVDs)

A five degree-of-freedom (DoF) multibody lumbar-spine model has been developed using the MapleSim software (Fig. 2). In this dynamic model, spine vertebrae are assumed to be rigid bodies that are connected with five joints in between and six groups of ligaments: Anterior longitudinal (ALL), Posterior longitudinal (PLL), Ligamentum flavum (FL), Supraspinous (SSL), Capsular (CL), and Interspinous (ISL) ligaments. The anatomical insertion points for each ligament are provided in Table 1 [36].

Fig. 2
figure 2

Lumbar-spine functional unit with the pelvis and connecting nonlinear ligaments and IVDs

Table 1 Ligament insertion points

In-vitro experiments on ligaments in the literature and the resulting stress–strain curves from mechanical tensile experiments [37] reveal that the mechanical behavior of lumbar-spine ligaments can be modeled as nonlinear elements [3841]. As a result, the ligaments have been defined as nonlinear spring and dampers in the model, with the insertion points for nonlinear spring and damper replicating the same anatomical insertion points. Additionally, to accurately model the behavior of the ligaments, it is important to include the fact that they are only active when they are in tension. To do this, the nonlinear expression is generalized as proposed by Damn et al. [39] and the coefficients are adjusted according to the literature in-vitro experiments and the motion-capture experiment that we have performed. The following equations explain how nonlinear behavior is incorporated into the modeling of the ligaments:

$$ F^{L} = F^{L}_{k} + F^{L}_{d} $$
(1)
$$ F^{L}_{k} =a \; {\mathrm{ln} \left (e^{\frac{\varepsilon +b}{d}}+1 \right )\ }+c,~ $$
(2)

where \(F^{L}\) is the applied force by the ligaments and is a function of a ligaments’ relative stretch to their rest length (\(\varepsilon \)) and the rate of the relative stretch (\(\frac{d\varepsilon }{dt}\)). This force includes the resulting force from the nonlinear springs \(F^{L}_{k}\) and dampers \(F^{L}_{d}\). The relation for the nonlinear spring is defined by Equation (2), in which the coefficients \(a\), \(b\), \(c\), and \(d\) are specified for each ligament in Table 2.

Table 2 Parameter values describing nonlinear behavior of ligaments and IVDs (Eq. (2) and Eq. (5))

The damping force is assumed to be a function of the spring force:

$$ F^{L}_{d} = f \; F^{L}_{k} \; \frac{d\varepsilon}{dt} $$
(3)

as suggested by [39] and [42], where \(f = 10 \) (s/m).

The literature experiments on intervertebral discs (IVDs) have revealed that these elements exhibit a nonlinear behavior [39, 43, 44] and mechanical properties of healthy and degenerated IVDs have been extracted from the literature [25]. In order to capture this nonlinear behavior, a multibody model was developed that included nonlinear springs and dampers. This model was able to predict the nonlinear mechanical response of IVDs in the lumbar region from the pelvis to vertebra L1. Mathematically, the nonlinear behavior of IVDs has been modeled using a set of equations that capture their dynamic nature. This has enabled a better understanding of the biomechanics of the lumbar spine and its related elements:

$$ T^{D}=T^{D}_{k}+T^{D}_{d} $$
(4)
$$ T^{D}_{k}=p_{1} \; {\mathrm{tanh} \left (\frac{{\varphi }^{3}}{p_{2}} \right )\ }+p_{3} \; \varphi $$
(5)
$$ T^{D}_{d}=\delta ^{D}_{d}~\frac{d\varphi }{dt}, $$
(6)

where \(T^{D}\) is the applied torque by IVDs in flexion and extension and is a function of joint-angle changes (\(\varphi \)) and the rate of the change (\(\frac{d\varphi}{dt}\)). The resulting torque is from the nonlinear springs \(T^{D}_{k}\) and dampers \(T^{D}_{d}\). Equation (5) is a nonlinear expression representing the spring behavior in the IVD model. The coefficients in this equation are specified in Table 2 and the damping coefficient \(\delta ^{D}_{d}\) is 100 \({}\text{ N}\text{ m}\) s, as suggested by [39, 45].

2.3 Multibody dynamics human skeletal model

A 10-Degree-of-Freedom (DoF) sagittal human dynamic model has been developed using the MapleSim software, featuring 7 DoF for the spine (rigid bodies connecting the S1–L5, L5–L4, L4–L3, L3–L2, L2–L1, L1–T12, and T6–T5 vertebrae) and each joint in the lower limbs (hip, knee, and ankle joints) has 1 DoF as shown in Fig. 3. The joint-coordinate system is based on the standard for joint kinematics recommended by the International Society of Biomechanics (ISB) [46]. This model assumes stationary feet relative to the ground and symmetrical sit-to-stand movement in the sagittal plane. Nonlinear elements such as lumbar-spine ligaments and intervertebral discs have been added to the model, resulting in a comprehensive forward dynamic model of the human skeleton. The forward dynamic model of the human skeleton can be written in the following form:

$$ \mathbf { u = M\;\ddot{x}+C+G },\ $$
(7)

where \(\boldsymbol{u}\) are the 10 joint torques, \(\mathbf{x}\) are the joint angles, \(\mathbf{\dot{x}}\) are the joint velocities, \(\mathbf{\ddot{x}}\) are the joint accelerations, \(\mathbf{M(x)}\) is the mass matrix, \(\mathbf{C(x,\dot{x})}\) is the vector of Coriolis and centripetal forces, and \(\mathbf{G(x)}\) contains gravitational forces.

Fig. 3
figure 3

Definition of joint angles in the model

2.3.1 Modeling, geometry, and anthropocentric data

To have an accurate dynamic model of a specific subject, anthropometric data must be obtained accordingly. The mass properties of the upper body were extracted from [47], while coefficients of the regression equation \(y=b0+b1\times BM+b2\times BH\) necessary for estimating the anthropometric data of the lower limb were taken from [48]. This equation relates the segments’ mass properties (\(y\)) to the body mass (\(BM\)) and height (\(BH\)) of subjects. Furthermore, the mass assignment for different body segments are listed in Table 3, and the center-of-mass (COM) for each segment of the upper limb was the proposed COM from [49]. Lastly, the length of each body segment was extracted from the motion-capture experiment measurements for each individual subject.

Table 3 Anthropometric data for participant 2

2.3.2 Motion-capture experiment

In this sit-to-stand motion-capture experiment, different segment geometries were extracted while the measured kinematics (i.e., joint angles) were used to validate the results from the predictive model. This experiment was conducted at the University of Waterloo after the ethics application was accepted by the University of Waterloo ethics committee (multibody biomechanical modeling of activities of daily living, ethics number 31194). During the motion-capture process, passive markers were used to extract the positions and orientations of each body segment. This experiment was performed to compare the results for two healthy volunteered participants with different spinal conditions (Table 4) and with scaling the anthropometric data for subject 2 (Table 3), we could validate our predictive simulation by comparing the joint-angle results. The two participants were asked to perform 5 trials of normal sit-to-stand motions from a sitting posture on a stool with about 90 knee flexion.

Table 4 Participant information

Anatomical marker placement is detailed in Table 5 and Fig. 4, providing the position and orientation of body segments. Using this information, joint angles during the motion were calculated based on the general reporting standard for joint kinematics recommended by the International Society of Biomechanics (ISB) [46].

Fig. 4
figure 4

Marker placement on the subject

Table 5 Anatomical marker placement on body segments

2.4 Optimization and predictive simulation

A dynamic predictive simulation can be used to gain insights into how spine stiffness, spine fusion surgery, and aging influence the outcome of a THA surgery. To achieve this, an optimal control approach is employed with a dynamic human model to predict sit-to-stand motion. Symbolic dynamic equations extracted from MapleSim are utilized to compute gradients and boost numerical convergence. Trajectory optimization is employed to discretize the continuous movement, and to predict joint angles in each step. OptimTraj, a MATLAB [MathWorks, R2022b, U.S.A] library designed for continuous-time, single-phase trajectory-optimization issues, was used [50]. Different methods can be used to solve such problems [50, 51], with the direct collocation method being employed in this research. Symbolically extracted equations of motion from MapleSim were applied to the method as dynamic constraints, forming a general optimization problem of the following form:

$$ {\mathop{\mathrm{min}}_{x\left (t\right ),\ u(t)} J_{B}\left (t_{0}, \ t_{f},\ x\left (t_{0}\right ),\ x\left (t_{f}\right )\right ) } + \int ^{t_{f}}_{t_{0}}{J_{P}\left (\tau ,x\left (\tau \right ),u\left ( \tau \right )\right )d\tau } $$
(8)

subject to the following constraints:

$$\textstyle\begin{array}{l@{\qquad }l} \dot{x}\left (t\right )=f\left (t,x\left (t\right ),u\left (t\right )\right ) & \text{System dynamics} \\ C_{p}\left (t,x\left (t\right ),u\left (t\right )\right )\le 0 & \text{Path constraints} \\ C_{B}\left (t_{0},\ t_{f},\ x\left (t_{0}\right )x\left (t_{f}\right )\right )\le 0 & \text{Boundary constraints} \\ x^{-}\le x(t)\le x^{+} & \text{Bounds on states} \\ u^{-}\le u(t)\le u^{+} & \text{Bounds on controls} \\ t^{-}\le t_{0}< t_{f}\le t^{+} & \text{Bounds on initial and final time} \\ x^{-}_{0}\le x(t_{0})\le x^{+}_{0} & \text{Bounds on initial state} \\ x^{-}_{F}\le x(t)\le x^{+}_{F} & \text{Bounds on final state}, \end{array} $$

where \(J_{B}\) are the boundary conditions, and the integral part (\(J_{P}\)) represents the cost function for this optimization along the motion. The cost function that has been used in our trajectory optimization is:

$$ J_{P}=\sum ^{n}_{i=1}{\int ^{t_{f}}_{t_{0}}{\left ( \frac{u_{i}}{u_{i}^{max}}\right )^{2}}}+\sum ^{n}_{i=1}{\int ^{t_{f}}_{t_{0}}{{w_{i} \mathop{x_{i}}\limits ^{...}}^{2}},} $$
(9)

where \(n=10\), \(u_{i}\) are joint torques, \({\mathop{x_{i}}\limits ^{...}}\) are joint jerks (the derivative of joint acceleration), and \(w_{i}\) are weights. We have found this cost function to have the lowest errors in the predicted joint-angle results compared to the motion-capture experiment (other cost functions were combinations of joint torques, velocities, and jerks). To define the sit-to-stand motion, initial and final states, which are extracted from motion-capture data, were imposed to the problem and the trajectory of motion was predicted.

There are various approaches for solving continuous-time single-phase trajectory-optimization problems. In this research, a direct collocation method has been adopted. This method is particularly advantageous due to its discretization of the problem, which translates the trajectory-optimization problem into a nonlinear problem [50]. The number of discretization points is a key factor that influences the accuracy and reliability of the solution. Thus, a convergence analysis was conducted to assess the variation in the results after changing the discretization points and ensuring convergence.

2.5 Different spinal-condition assumptions for the predictive simulation

Three different spinal conditions were assumed in the model and the sit-to-stand motion was simulated in each condition.

  1. 1.

    Normal spine: The first assumption is subjects with normal spine stiffness. For this category, the joint-angle results from the predictive simulation were compared to the results from the motion-capture experiment (healthy subject with normal spinal condition – participant 2) to validate the model. However, after the model is validated, two other spinal conditions are applied in the model to predict the effects of spine fusion and different spine stiffness on lower-limb motion.

  2. 2.

    Stiff spine: Two categories are considered for the stiff spine;

    Fused spine: Different levels of spinal fusion were assumed in the model according to a clinical report on the prevalence of fusion at different levels [9]. The fusion is modeled by considering some limitation on the range of motion of spinal joints (i.e., S1–L5, L5–L4, L4–L3, L3–L2). For the fusion at each level, we limited the range of motion for that specific joint to 1–2 degrees to represent the effects of fusion. For example, if the fusion is assumed at L5–L4 and L4–L3 levels, the range of motion for these two joints are limited in the predictive simulation. Some studies reported that sacrum involvement in a spinal fusion would cause more spinal stiffness [8]. Therefore, a comparison is provided by including and excluding the sacrum from the spinal fusion in the simulated motion.

    Anatomical or aged stiff spine: The mechanical properties of ligaments, muscles, and IVDs can be changed due to aging or IVD degeneration. According to some research on how aging [24, 52] and degeneration [25] would change the mechanical properties of these elements, we modified the spine stiffness in our model by applying these changes in the model to see how a stiff spine would affect pelvic tilt and lower-limb motion. We have increased the spine-stiffness properties of the ligaments and IVDs by 50% [24, 52] to model the spine with higher stiffness. The values of parameters in Eq. (2) and Eq. (5) (describing the stiff spine) are reported in Table 6.

    Table 6 Parameter values describing nonlinear behavior of ligaments and IVDs (Eq. (2) and Eq. (5)) for stiff spine

2.6 Impingement analysis and implant-positioning optimization

A practical application of the developed predictive model is to use it as a tool to address different patient-specific scenarios by optimizing implant positioning and orientation in THA surgery, in order to achieve an optimal surgical outcome. To optimize cup positioning and orientation in THA surgery, one of the main criteria is to avoid implant impingement. Following a similar definition proposed by [53], and the criterion introduced by [54], an optimization approach can be used to maximize the angular distance between the stem on the femoral component and the edge of the acetabular cup, in order to avoid any impingement. This angular distance, henceforth referred to as the “Angular Impingement Distance (AID)”, can be calculated using the following equation:

$$ {\mathop{\mathrm{\theta _{AID}}} = \frac{\pi}{2}\ + \alpha - sin^{-1} \left (\frac{d_{neck}}{d_{head}}\right )\ - \phi _{stem}}, $$
(10)

where \(\alpha \) is the constant cup-opening angle, \(d_{neck}\), \(d_{head}\) are the diameters of the neck and head of the femoral component, and \(\phi _{stem}\) is a varying angle between the stem and the cup’s axis of symmetry, marked by \(\hat{n}\) (Fig. 5). If the AID is greater than zero, there is no impingement; however, if it is less, it indicates implant impingement.

Fig. 5
figure 5

The simulation model (center), including detailed spine model (left) and AID impingement definition (right)

To prevent implant impingement, we should maximize the angular distance (\(\theta _{AID}\)) calculated from Eq. (10) at every instant of the motion. To achieve this, an optimization technique is employed to maximize the minimum AID during the motion. This approach ensures that the cup component and femoral implant (stem) are kept at their maximum possible distance throughout the motion:

$$\begin{aligned} &{\mathop{\mathrm{argmax}}_{\beta _{Ant}}\left ({\mathop{\mathrm{min}}_{t_{0}< t< t_{f}} \theta _{AID}\left (t,\beta _{Ant},\beta _{Inc}\right )}\right )}\\ & \text{subjected to: } {\beta _{Inc}}_{Min} \leq \beta _{Inc} \leq {\beta _{Inc}}_{Max} , \end{aligned}$$
(11)

where \(\beta _{Ant}\), \(\beta _{Inc}\) are the radiographic cup-anteversion and -inclination angles, respectively as defined by [55] (Fig. 6).

Fig. 6
figure 6

Radiographic anteversion (\(\beta _{Ant}\)) and inclination (\(\beta _{Inc}\)) [55]. The International Society of Biomechanics (ISB) standard is used to define the pelvis local-coordinate frame [56]

The predefined values used for \(\beta _{Inc}\) in the range (\({\beta _{Inc}}_{Min} \leq \beta _{Inc} \leq {\beta _{Inc}}_{Max}\)) suggested in some clinical research [9, 15], and the \(\beta _{Ant}\) has been optimized for patients with different spinopelvic mobility and stiffness. The reason that we are more focused on the anteversion cup-positioning angle is that in the sagittal motion, different spine stiffness would change the relative pelvic tilt. Some studies in the literature showed that every \(1^{\circ}\) of change in pelvic tilt would result in acetabular anteversion (\(\beta _{Ant}\)) being changed by 0.7–0.8 and only 0.2–0.3 change in the acetubular inclination (\(\beta _{Inc}\)) angle [5759].

3 Results and discussion

3.1 Validation of lumbar-spine functional unit and predictive dynamic model

Two validations have been conducted to assess the accuracy of the predictive model’s kinematic and dynamic performance. To begin, an in-vitro experiment [60] from the literature was used to validate the detailed spine-dynamics model. The inverse-dynamic model of the functional spine unit was employed to calculate the mechanical response of the unit to the loading conditions reported in the literature. The range of motion of the unit under bending moments of 5 N m and 10 N m for flexion and extension was then evaluated and compared to the results listed in Table 7. Validation of the functional spine-dynamic model using an in-vitro experiment to perform different loading conditions, and comparing the resulting range of motion between the model and literature, showed that the model is capable of accurately predicting the spine range of motion.

Table 7 Validation of the functional spine-dynamic model using in-vitro experiments performing different loading condition and comparing resulting range of motion (ROM) between the model and literature [60]

The second step involved validating the resulting motion from the predictive simulation to the motion-capture experiment. As discussed previously, the detailed spine unit was used to develop a human predictive dynamic model. The joint-angle results from the human dynamic model were compared to those of the motion-capture experiment for the corresponding subject, as shown in Fig. 7. The difference between experimental and numerical results is mostly due to the fact that the markers were placed on the skin, meaning that the relative motion of the skin on the joints affects the resulting joint movements captured by the motion-capture system. Also, we could not use more markers on the spine due to the very close distances that vertebrae have and because the tracking of markers during the experiment can be very difficult. The prediction error for each joint (compared to the mean value of the motion capture joint-angle results for subject 2) was calculated using the Root Mean Square (RMS) error formulation as:

$$ RMS=\frac{1}{n_{g}}\sum ^{n_{g}}_{i=1}{\sqrt{{\left (q_{i}^{(opt)}-q_{i}^{(exp)} \right )}^{2}}}, $$
(12)

where \(q_{opt}\) is the predicted joint angle in each grid point, \(q_{exp}\) is the experimental result, and \(n_{g}\) is the number of grids in the optimization (Table 8).

Fig. 7
figure 7

Validation of the predictive model using the results from motion-capture experiments for subject 2

Table 8 RMS error for each joint angle for subject 2

Comparing the ROM for each joint and the calculated RMS error in Table 8, we can see that the error for spinal joints, particularly the upper ones, is greater than that of lower-limb joints. This is mainly attributed to the presence of soft tissue and skin effects that are more pronounced on spinal joints. However, the results for lower limb joints are encouraging.

3.2 Results of the motion-capture analysis experiment for a sit-to-stand motion

Static X-rays offer limited insights, primarily capturing sitting and standing postures. Tracking spinopelvic parameters and joint angles during transitions is advantageous, yet not always practical presurgery due to time and cost constraints. To address this, we leverage motion-capture experiments to compare lower-limb motion across subjects with varying spinal stiffness, validating our predictive model. This streamlined approach enables efficient and cost-effective preoperative use. The joint angles extracted using experimental motion-capture data provide insights into spinopelvic behavior during a sit-to-stand motion. Three variables have been extracted from the joint-angle results for further analysis, including pelvic tilt (PT), lumbar lordosis (LL), and hip-joint angles. It is important to measure these anatomical variables preoperatively, since different values can significantly impact the surgery outcome. Figure 8 illustrates the trajectories of PT, LL, and hip-joint angles during the motion for two healthy subjects with different spinal conditions, from sitting to standing. Comparisons of lumbar lordosis and pelvic-tilt changes during the motion for these two subjects reveal that subject 1 has a stiffer spinopelvic complex (less change in LL and PT during the motion).

Fig. 8
figure 8

Motion-capture experiment results: A comparison between hip-joint angle, pelvic tilt, and lumbar lordosis changes during motion for two subjects with different spinal stiffnesses

The results from this method not only provide \(\Delta PT\) and \(\Delta LL\) (static comparison of sitting and standing postures), but also enable us to track the trajectory of changes in PT and LL throughout the entire range of motion. Examining the results in Fig. 8, the higher hip-joint angle with less pelvic tilt (subject 1) could be indicative of the higher risk of impingement or dislocation after THA for subject 1, if both subjects have THA surgery. Additionally, it is evident that the most critical moment for a potential dislocation is not necessarily sitting or standing. The points with a higher hip-joint angle (Point P1: subject1, Point P2: subject 2) coincide with lower pelvic tilt and represent the critical instances. As depicted in Fig. 8, the potential critical moment for a possible dislocation is a subject-specific moment between the initial sitting and final standing postures when the subject is leaning forward and ready for standing up (different instant for points P1 and P2).

3.3 Prior spine-fusion surgery and the risk of hip dislocation in THA surgery

3.3.1 Effect of spine-fusion surgery on spine stiffness

Spinal fusion is a surgical process in which two or more levels of the spine vertebrae are fused together to reduce or eliminate movement between them. This process makes the spine stiffer, consequently decreasing the contribution of the spine in motions such as sit-to-stand. Subsequently, the hip joint must compensate for the lack of mobility of the spine, leading to an increased ROM in the hip-joint angle and an increased risk of impingement. Employing the predictive human dynamic model, the fusion has been integrated into different levels of the spine. Figure 9 illustrates the results for the simulation of the sit-to-stand motion for normal and stiff spines. A comparison of hip-joint angle, PT, and LL trajectories is depicted in this figure, demonstrating how a stiff spine, with less contribution of the spine in the motion (i.e., less LL variation), affects PT and hip-joint angle in different cases. It is evident that for subjects with stiff spines, the pelvis must compensate for the lack of contribution of the lumbar spine in the sit-to-stand motion, causing the pelvis to have a more forward tilting in the middle of the motion (30–50% of motion) as well as less backward tilting at the end of the motion (80–100% of motion). This could lead to an increased risk of anterior impingement and posterior dislocation in the midst of a sit-to-stand motion, as well as an increased risk of posterior impingement and anterior dislocation at the end of the sit-to-stand motion or during a bending forward motion, which is more common in such spinal conditions [22].

Fig. 9
figure 9

A comparison of the predictive model results for the normal, stiff, and fused spine in different levels

3.3.2 Different levels of spine fusion and THA-outcome consequences prediction

Vigdorchik et al. [9] evaluated THA outcomes for variously categorized patients and found that over 53% of the study population had a stiff spine or malalignment. The research demonstrated the breakdown of patients with a stiffer spine resulting from fusion surgery to different levels of fusion, but did not provide any specific guidelines for each level of fusion in the spine. In response to this, our predictive simulation revealed that different levels of fusing can have varying effects on lower-limb motion and hip ROM, as depicted in Fig. 9.

Comparing the pelvic tilt (PT) and lumbar lordosis (LL) in the predicted motion of normal and fused spinal conditions revealed distinct spinopelvic motion patterns. As depicted in Fig. 10, in the fused-spine condition, while the LL remains constant, the pelvis tilts more forward during the midphase of the motion (lift-off phase) to compensate for the reduced spinal contribution, and tilts less backward at the conclusion of the motion (standing phase). This alteration in pelvic tilt increases the risk of implant impingement, a concern we will delve into further using the angular impingement distance (AID) metric. This motivated us to further evaluate different levels of fusion, sacrum involvement, anatomically stiff and fused stiff spines, in combination with an impingement analysis, to gain an understanding of the effects on THA outcomes. In the following sections, we present the findings of our impingement analysis considering cup orientation in Lewinnek’s safe zone, as well as provide surgical recommendations for various spinal conditions through a dynamic-motion analysis and cup-orientation optimization.

Fig. 10
figure 10

A Comparison of predictive model motion results for the spine and pelvis in normal (solid shape and lines) and fused (transparent shape and dashed lines) conditions during two phases of sit-to-stand motion: A) Lift-off phase, B) Standing phase

3.4 The impingement analysis results: is the “lewinnek safe zone” really safe?

By utilizing the method for the analysis of implant impingement (Eq. (10)), we tracked the risk of impingement during a sit-to-stand motion for both healthy and fused-spine subjects for the \(\beta _{Inc}\) and \(\beta _{Ant}\) values within the Lewinnek safe zone. The AID metric was calculated considering all possible combinations of proposed cup anteversion and inclination by Lewinnek, which are \(5^{\circ}\leq \beta _{Ant} \leq 25^{\circ}\), \(30^{\circ }\leq \beta _{Inc} \leq 50^{\circ}\) [5]. The AID trajectories are shown in Fig. 11 during the motion.

Fig. 11
figure 11

Impingement analysis results evaluating the Lewinnek safe zone for the predicted motion of healthy (graphs above the line) and stiff spine (graphs below the line) subjects. The 3D contour graph (left) shows all possible combinations of anteversion and inclination angles and calculated AID values during the motion. To provide a better insight, some instances of motion are shown as 2D contour graphs (right). The lower the values of the AID, the higher the risk of impingement (\(AID = 0\) means the impingement occurred). While healthy spines (graphs above the line) have no close-to-zero AID values, the stiff-spine subject (bottom) has some zero or subzero values (\(t = 0.6\text{ s}\)), indicating a potential moment of impingement

From Fig. 12, the most critical inclination and anteversion values (min[AID]) within the Lewinnek safe zone for both subjects was depicted and the AID trajectories and hip-joint angle during the motion are shown in Fig. 12. Consequently, numerical evidence was provided to demonstrate that cup positioning with anteversion and inclination proposed as the “Lewinnek safe zone” is not necessarily safe for all patients who undergo THA surgery. Thus, a dynamic-motion analysis and cup-orientation optimization is required to avoid implant impingement after THA surgery. There is other research in the literature that addresses this issue. For instance, in an study by Widmer et al. [29] they introduce a comprehensive approach that takes into account both cup and stem orientations, recognizing the limitations of the static assessment employed in the traditional Lewinnek safe zone. The results of the study highlight that the combined target zones for impingement-free cup orientation exhibit polygonal boundaries. Notably, the size and position of these zones are found to be contingent on specific parameters, including neck-shaft angles, stem anteversions, and radiographic cup anteversions. These findings underscore the intricate interplay between design and implantation parameters in achieving optimal outcomes in THA.

Fig. 12
figure 12

Impingement analysis for healthy and fused-spine subjects, showing that AID could be less than zero for a fused spine subject (impingement occurred), at critical values for inclination and anteversion that are within the Lewinnek safe zone

3.5 Cup-implant-orientation optimization

The predictive human motion model offers the potential to perform preoperative planning for patients with varying spine conditions. Several clinical studies have proposed modifications to the proposed inclination and anteversion angles suggested by Lewinnek [9, 27, 61]. However, using the same treatment approach in THA surgery for patients with varying spinal mobility and stiffness can increase the risk of impingement for those who have had prior surgery or have stiff spines. Our numerical approach (AID calculation throughout the motion) in Fig. 13.A illustrates this risk. For this impingement analysis, the recommended \(\beta _{Inc}\) and \(\beta _{Ant}\) values for normal mobility by Vigdorchik [9], \(\beta _{Inc} = 42^{\circ}\) and \(\beta _{Ant} = 23^{\circ}\), were adopted for all subject assumptions using implant parameters reported in Table 9. As seen in Fig. 13.A, this configuration of \(\beta _{Inc}\) and \(\beta _{Ant}\) angles placed patients with stiffer spine or fused spine at a higher risk of impingement, especially when changing from a sitting to standing position (20–30% motion). This critical moment for impingement was predicted following the presentation of our experimental results (Fig. 8) and predicted motion results (Fig. 7).

Fig. 13
figure 13

Implant-impingement analysis for A: recommended values of \(\beta _{Inc}\) and \(\beta _{Ant}\) in the literature for normal spine subjects and B: optimized values for each spinal condition to avoid impingement; the more distance the trajectories have from the solid red circular impingement area (higher AID values), the safer patients are from implant impingement

Table 9 Implant Parameters Used in Simulation Studies [62]

The higher risk of implant impingement (i.e., the closer the trajectories are to the red impingement area) for fused and stiff-spine patients without any modification in inclination and anteversion angles, as demonstrated in Fig. 13.A, motivated us to introduce a new patient categorization (Fig. 14) and devise an optimization approach to determine patient-specific cup-positioning angles based on different spine conditions. To that end, we utilized the optimization approach outlined in Eq. (11) to calculate optimized values for cup orientation for each spinal condition (Table 10).

Fig. 14
figure 14

A new categorization of patients who are possible candidates to be preoperatively monitored using predictive simulation for an optimal cup-anteversion positioning; N: normal stiffness and mobility, S: stiff spine, which has three subgroups: SA: spine stiffness due to aging or anatomical parameters (i.e., \(\Delta SS<10\)), SF1: one or two levels of lumbar-spine fusion, and SF3: three or more levels of lumbar-spine fusion. In the spine-fusion condition, the sacrum engagement affects the results

Table 10 Comparison of the optimized (model) cup-anteversion values for different spinopelvic mobility and stiffness compared to the literature (lit) [9, 15]. The results of fusions with (S1✓) and without (S1 ×) sacrum involvement are presented

The impingement analysis for the optimized values of anteversion angle is presented in Fig. 13.B. As can be observed, the optimized values of anteversion angle ensure that the AID trajectories for different spinal conditions (i.e., normal, anatomically stif,f and a S1–L5–L4 fusion) remain as far as possible from the impingement area (i.e., \(AID \leq 0\)), compared to using mean values of anteversion angles that have been recommended in the literature (Fig. 13.A) [9]. The results for the optimized values in different spinal conditions have been shown in Table 10 and compared to the clinically recommended values by Vigdorchik et al. [9].

The results of the subject-specific optimized values of cup-anteversion angle are presented in Table 10. To the best of our knowledge, this is the first prediction of subject-specific cup-component anteversion values for different spinal conditions. We compared the results of our predictive model (the optimization of cup orientation) with clinical recommendations for subjects in the same category as we defined. From Table 10, the results of our optimization approach have a good correlation to what has been suggested for the same categories of patients. Our subject-specific impingement analysis are for different spinal-fusion levels. In contrast, the clinical recommendations are based on general patient categorization of normal, deformity, fused, and stiff [9, 15]. Comparing the minimum AID values in the last two columns of Table 10 reveals how the new patient categorization presented in this paper helps decrease the risk of impingement after THA. Comparing the last two column of Table 10, the more discrepancy between the calculated AIDs for different spinal conditions (optimized values and the literature) can be found for the fused spine in different levels, particularly where the sacrum is involved in the fusion. While some simulation values align with the existing literature (e.g., the first row of Table 10 pertaining to normal spines), instances where optimized values diverge from clinical reports suggest a potential reduction in impingement risk. It is worth noting that following clinical recommendations does not lead to an impingement, but it shows a higher risk of impingement according to lower AID values in some cases. Our calculated AID values (based on optimized cup anteversion) indicate a lower risk with higher AID scores than the clinical recommendations. Furthermore, clinical reports do not provide specific recommendations for each fusion level, generally relying on broad adjustments for fusion or stiff spine. This may explain the discrepancies between our optimized values and established clinical practices. In fact, we propose a reconsideration of patient-specific cup-implant positioning to potentially enhance outcomes in such cases. This indicates that making the patient categorization more subject specific, as we did in this research, can help to have a better preoperative planning, which can lead to a better outcome after THA surgery. We have also compared the results with the modified impingement-free combined target zone (safe zone) that is presented by Widmer et al. [29]. Upon scrutinizing their findings, we observed a congruence between our optimized cup-anteversion angle and their proposed combined target zone. Specifically, aligning the stem with a 5-degree retroversion (which mirrors our approach) places the target zone in the upper segment of the diagram (with anteversion angles ranging from \(23^{\circ}\) to \(40^{\circ}\)). Significantly, our results fall within this range as well.

Our findings indicate that a stiffer spine (either anatomically stiff or fused) leads to a noticeable alteration in pelvic tilt during motion (see Fig. 8 and Fig. 9). Consequently, it is important to take into account revised orientation values for this specific patient group. When comparing our results with the literature on the influence of pelvic tilt on the optimal cup-anteversion angle [54], we observe that an increase in pelvic tilt necessitates higher values (\(\geq 25^{ \circ}\)) for the cup-anteversion angle to prevent impingement, which is concluded in our results as well (Table 10). These values exceed the range suggested by Lewinnek as the “safe zone”, underscoring the significance of our patient-specific optimization approach in this study.

4 Conclusions

In this study, a predictive dynamic human model was proposed for preoperative Total-Hip Arthroplasty (THA) surgery planning. By offering predictive simulations that considered different spinal conditions, the model was able to answer“what if” scenarios and evaluate the impact of spine stiffness on lower-limb dynamics. The preliminary results from the simulations were encouraging, prompting us to conduct further studies, including impingement analysis, to provide patient-specific suggestions for optimal acetabular-cup orientations. By utilizing optimization, this model was able to suggest a computationally efficient way to determine the best patient-specific cup orientation, while taking into account different spinal conditions and their effect on lower-limb motion. This could address a knowledge gap in the current clinical research and methodology on THA surgery, especially considering the effect of flexible/stiff spine on lower-limb motion. The present method has several advantages compared to the existing literature, as outlined below:

  • Predictive model (no need for motion-capture data): Predictive modeling offers advantages over inverse-dynamic models [54], as it eliminates the need for importing certain motions into the model before it can analyze the dynamics. Instead, our approach utilizes forward dynamics, optimization, and predictive simulations to circumvent this limitation.

  • Spine flexibility: To the best of our knowledge, this is the first time spine flexibility (e.g., spine stiffness, spinal fusion, and aged or anatomically stiff spines) has been examined in a predictive dynamic simulation with an aim to assess its impact on lower-limb motion and the success of THA surgeries.

  • Computationally efficient: Finite-element analysis (FEA) simulations [63, 64] are known to be time consuming and complicated. In contrast, the method presented in this paper is much faster as it is based on symbolic dynamic equations. This makes it a practical choice for preoperative applications as well as for intraoperative ones.

In conclusion, we have presented a predictive dynamic model, using an optimal control approach, to produce preoperative plans tailored to various spinopelvic conditions. Our findings suggest that a patient’s spine stiffness must be taken into account when creating preoperative plans, as it is affected by age, anatomy, or fusion. Additionally, our model highlights the importance of evaluating different degrees of fusion to provide patient-specific advice regarding cup orientation. However, there are some limitations of this model to be addressed in future studies, including other factors that should be considered for a comprehensive optimal cup orientation such as soft tissues, implant design, body impingement, edge loading, and muscle contribution. Other limitations of this study are listed below:

  • The models here have been validated for healthy subjects only. The validated model then is used to study different spinal conditions in a predictive simulation approach.

  • Motion capture has been used to obtain dimensions and kinematic validation, but it has its own inherent drawbacks, as soft tissue (skin motion) artifacts may affect the accuracy of joint angles calculated from motion-capture experiments. For future studies, we suggest using videofluoroscopy images that can provide more accurate motion and segment geometry.

  • We have used a sagittal model in our predictive simulation. This causes limitations for activities other than sit-to-stand to be included in this study. This limited the motions we could use to calculate optimized values for all problematic motions.

  • Although we introduce the predictive optimization approach as a tool to evaluate a wide range of scenarios, we did not investigate model sensitivity to human subject size and gender. Research on how body mass index or posture-related disorders affects the results are suggested for future studies.

  • The ligament-insertion points were sourced from the existing literature. Conducting an in-vitro experiment or using MRI images could enhance the accuracy of these insertion points.

  • While the method used to calculate the distance to impingement (AID) can accommodate three-dimensional analysis, due to the single degree-of-freedom (DoF) in the hip joint of our predictive model, the analysis focused solely on this specific DoF in optimizing the cup-anteversion angle. As a result, the research did not explore other motions involving additional DoFs in the hip joint, representing a limitation for our research.

  • The study employed a single implant design, which may limit the generalizability of the findings to other designs.