# 6-DoF Grasp Pose Evaluation and Optimization via Transfer Learning from
NeRFs

Gergely Sóti1,2, Xi Huang2, Christian Wurll1 and Björn Hein1,2 The authors are
with 1Institute of Robotics and Autonomous Systems, Karlsruhe University of
Applied Sciences, 76133 Karlsruhe, Germany, and 2Institute for Anthropomatics
and Robotics, Karlsruhe Institute of Technology, 76131 Karlsruhe, Germany.We
would like to thank Prof. Andreas Wagner of the Karlsruhe University of
Applied Sciences for providing computational resources for this research.This
research is being conducted as part of the KI5GRob project funded by the
German Federal Ministry of Education and Research (BMBF) under project number
<EMAIL_ADDRESS>
###### Abstract

We address the problem of robotic grasping of known and unknown objects using
implicit behavior cloning. We train a grasp evaluation model from a small
number of demonstrations that outputs higher values for grasp candidates that
are more likely to succeed in grasping. This evaluation model serves as an
objective function, that we maximize to identify successful grasps. Key to our
approach is the utilization of learned implicit representations of visual and
geometric features derived from a pre-trained NeRF. Though trained exclusively
in a simulated environment with simplified objects and 4-DoF top-down grasps,
our evaluation model and optimization procedure demonstrate generalization to
6-DoF grasps and novel objects both in simulation and in real-world settings,
without the need for additional data. Supplementary material is available at:
https://gergely-soti.github.io/grasp

##  I Introduction

Robots are increasingly being deployed in less controlled environments, from
domestic settings with vacuuming robots to medical facilities with surgical
robots, and even in industrial and surveillance contexts. Despite significant
research efforts in the field of robotic manipulation, robots that can handle
everyday objects are still missing from real-world environments. This gap is
particularly notable given the wide range of potential applications in
logistics, retail, and home automation. One fundamental task that stands as a
bottleneck to these applications is grasping, which is essential for
activities ranging from simple pick-and-place tasks in packaging and sorting
to fulfilling orders in warehouses, restocking shelves in stores, and even
loading dishwashers at home.

Figure 1: Two grasp candidates after optimization for grasping a boot in the
real world. The left images display the model’s input, the middle images
depict how the model ’imagines’ the scene from a different perspective, and
the right image shows the executed grasp, indicated by the green marker. Note
that the markers depicting the gripper pose are overlays and do not get
occluded by objects in the scene. The model was only trained in simulation
using monochromatic prismatic objects and top-down grasps; it has never been
seen boots, real-world images, or non-top-down grasps.

Addressing the challenge of grasping in less controlled, real-world
environments is far from trivial. Several factors contribute to this
challenge: the need to generalize to unknown objects, achieving reliable
performance under real-world conditions, and scaling to handle the diversity
and uncertainties inherent in real-world settings. Although some existing
approaches perform well in the real-world, they rely on real-world data or
heavily augmented and fine-tuned simulated data [1, 2, 3, 4, 5]. These methods
would still struggle with mismatches in data distribution, a likely occurrence
in real-world applications, and would require a vast amount of data to
overcome this limitation.

In this work, we introduce a method that leverages Neural Radiance Fields
(NeRF) for robotic grasping. We transfer the learned implicit representations
of visual and geometric features from a trained NeRF model to evaluate grasp
candidates, where higher values indicate a more likely successful grasp. Using
the output of this function as an objective for optimization enables the
identification of successful 6-degrees-of-freedom (DoF) grasp poses based on
RGB camera images with known intrinsics and extrinsics. Although our model was
trained on simple 4-DoF grasps in simulation, it generalizes to 6-DoF grasps
both in simulation and in the real world (Fig. 1) without additional modules
like segmentation or pose estimation. Generalization to the real-world is
achieved without adaptation or using real-world training data.

##  II Related Work

Common approaches to skill acquisition in robotics from low-level sensor data
include imitation learning [6, 7] and reinforcement learning [8, 9]. Imitation
learning leverages human demonstrations for supervised learning of a policy.
Reinforcement learning operates autonomously but requires extensive data and
environmental interactions, making it less practical for real-world
applications. Given these constraints, imitation learning emerges as
preferable when human expert demonstrations are more convenient and cost-
effective.

Behavior cloning is a widely-used technique within imitation learning for
robotic skill acquisition in real-world settings. Explicit models [10, 11, 12,
13] directly map observations to actions, such as converting visual cues into
end-effector poses for successful grasps. Recently, implicit models have
emerged as a promising alternative [14, 15]. These models utilize an energy-
based framework to learn a function that serves as an objective for an
optimization problem, the solution to which dictates the action [14].
Similarly, another study [16] conceptualizes grasping through an implicit
function and optimization but deploys a different learning strategy, focusing
on the distance to the nearest successful grasp rather than behavior cloning.

Beyond the scope of behavior cloning, implicit representations have been
employed to improve or augment methods of robotic grasping [17, 18, 19]. Their
usefulness also extends to various other tasks such as novel view synthesis
[20, 21, 22], semantic localization [23], segmentation [24], 3D reconstruction
[25, 26], and robot navigation [27].

In our method, we utilize NeRFs [20] as implicit representation to learn a
scene’s 3D structure using RGB images with known camera parameters. Using this
representation we learn to evaluate grasp candidates, with higher values
indicating a more likely successful grasp. This evaluation is used in a
gradient-based optimization method similar to [16], but we maximize the
estimated value instead of minimizing the estimated distance to the nearest
successful grasp pose. This requires far less data and aligns with the
behavior cloning paradigm. Building on our previous work [15], we extend the
model’s applicability from 3-DoF to 6-DoF grasps. We further show that our
approach is able to generalize from a small number of 4-DoF grasp
demonstrations in a simulation to 6-DoF grasps in cluttered and the real-world
settings.

##  III Method

Leaning on the idea from [15], we use the learned geometric representation of
a trained NeRF as a backbone to extract additional kinds of information from
the scene. We focus on grasping, but the methodology is versatile, not being
restricted to specific affordances, sensor types, or additional scene
attributes. This approach builds on principles already used in novel view
synthesis with the camera sensor as target.

###  III-A NeRF as a Scene Representation

NeRFs are trained on images from different perspectives of a scene and learn a
consistent geometric and visual representation of the scene [20]. They
inherently learn to represent a single, static scene but there are extensions
that condition NeRFs on images from different scenes and are therefore able to
represent multiple scenes given some observations [21, 22]. In our approach,
we use a modified version of VisionNeRF [22]: Multi-View VisionNeRF
(MVNeRF)111See supplementary material for detailed architecture.. In contrast
to VisionNeRF, it is able to process multiple input images simultaneously.
MVNeRFs map the 5-DoF space of positions $x$ and view directions $q$ to $RGB$
color and $\sigma$ density values in a scene $S$ given observations $o$:

$\Theta(x,q,o)=(RGB,\sigma|S)$ (1)

An observation consists of an image $i$ and its corresponding camera
parameters $M$. The function $\Theta$ emerges from a series of interconnected
modules, each contributing specific computational operations to the overall
model. An input image $i$ is processed by a Vision Transformer (ViT) and a
fully convolutional neural network (FCN) to compute global and local image
features. For each query position $x$ and view direction $q$, the
corresponding image feature is computed via projection using $M$ and bilinear
interpolation. The image features, $x$, and $q$ build the input of the NeRF
network, consisting of 6 MLP blocks and a final fully connected readout layer,
that outputs $RGB$ and $\sigma$. If multiple images are available, they are
processed independently until the 3rd MLP block and are fused via average
pooling. This averaged activation is then forwarded to the last 3 MLP blocks
and the final readout that produces the outputs. We define scene activations
as the average pooled activation and the activations of the last MLP blocks.
The model is supervised with a reconstruction loss between a ground truth
image and a view rendered using conventional volume rendering as in [20, 21,
22]. We initialize the ViT with pretrained weights from [28] and use the same
training configuration as in [22].

###  III-B Learning Grasp Evaluation

Figure 2: Left: generating training samples from a demonstration; middle and
right: training method - 5-DoF poses are computed from the 6-DoF grasp
candidate and are evaluated and fused in the grasp evaluation model, which
incorporates the pre-trained MVNeRF.

We characterize a grasp by the pose of its tool center point (TCP) $p$. Given
observations $o$ of scene $S$, our model should output high values in
successful grasp poses and low values where nothing can be grasped, thus it
should map to a value $v$ that behaves similarly to grasp probability: the
probability that 6-DoF grasp $p$ executed in $S$ results in a successful
grasp. The grasp evaluation model is defined as follows:

$\Psi(p,o)=v$ (2)

To be able to use a trained MVNeRF, we first need to transfer the 6-DoF grasp
into the domain of 5-DoF poses. For this, we compute a predefined set of
position and direction pairs (5-DoF poses) relative to $p$ encompassing the
TCP (Fig. 2, right). Each position $x$ and direction $q$ is processed by the
MVNeRF and we use the scene activations as input to a readout neural network
that fuses the information about these 5-DoF poses and ultimately computes
$v$1. More specifically, the scene activations of the MVNeRF are processed by
a fully connected layer independently reducing their dimensionality. The
outputs are concatenated and are processed by an additional fully connected
layer, again to reduce the dimensionality. Finally, two MLP blocks similar to
those in the NeRF network compute $v$ from these features.

We use grasp demonstrations for supervision. For each training scene, a ground
truth grasp is demonstrated. This is considered as a positive sample. We then
randomly sample poses in the workspace of the robot and label them as negative
samples (Fig. 2, left). During implementation and initial testing, we found
that it is beneficial to sample some negative poses in the proximity of the
ground truth grasp pose. Although there might be additional valid grasps in
these samples the probability is small. We treat the problem of learning
successful grasps as a classification problem and train it with cross entropy
loss using these labeled samples. During training, we only update the weights
of the readout neural network (Fig. 2, middle) and use the Adam optimizer [29]
with a learning rate of $10^{-4}$.

###  III-C Grasp Pose Optimization

With the learned grasp evaluation model we can define the implicit grasp model
that we use to find a successful grasp pose $p^{*}$ in scene $S$ given
observations $o$ by optimizing the objective function $\Psi$:

$p^{*}=\arg\max_{p}\Psi(p,o)$ (3)

$\Psi$ is differentiable, thus we can apply gradient based methods for
optimization. To find suitable grasp poses we optimize random initial poses
sampled within a predefined workspace by maximizing the output of $\Psi$ as
outlined in algorithm 1.

Gradient based update of transformations can lead to invalid transformations
depending on the representation and requires post-processing. During
development, we explored various transformation representations. Methods
describing the entire transformation, such as transformation matrices, screw
notation, and forward kinematics were less successful than approaches which
decouple position and orientation. Though orientation remains challenging to
represent, rotation vectors, quaternions and the axis-angle representation
performed similarly. However, we opted for quaternions because they showed
more consistent performance. Quaternions, being unit vectors, are normalized
during post-processing. Additionally, position values are clipped if they
venture outside the predefined workspace due to gradient ascent.

Algorithm 1 Grasp pose optimization

1:Observation $o$

2:Successful grasp $p^{*}$

3:$G\leftarrow\text{RandomGraspCandidates()}$ $\triangleright$ Initialization

4:while Not Terminate do $\triangleright$ Termination criterion

5: for all $p\in G$ do $\triangleright$ Parallelized

6: $p\leftarrow p+\nabla\Psi(p,o)$ $\triangleright$ Maximize $\Psi$

7: $p\leftarrow\text{PostProcess}(p)$ $\triangleright$ Fix pose

8: end for

9:end while

10:$p^{*}\leftarrow\arg\max_{p\in G}\Psi(p,o)$ $\triangleright$ Grasp with
highest success

11:return $p^{*}$

In the gradient-based update step, we use the Adam optimizer [29] to
separately optimize position and orientation. The optimization process uses a
fixed number of iterations as its termination criterion. Initially, 16
optimization steps are executed to adapt only the positions, utilizing an
initial learning rate of 0.05 and an exponential decay rate of 0.9.
Subsequently, we conduct another set of 16 optimization steps to optimize only
orientation, with an initial learning rate of 0.05 and an exponential decay
rate of 0.99. While this is our current approach, it is conceivable to use
more sophisticated methods that optimize both position and orientation
simultaneously or dynamically alter the optimization strategy based on
plateaus in the objective function or specific convergence thresholds.

##  IV Results

We evaluated our proposed robotic grasping model on three simulated tasks and
one real-world task. The simulated tasks were designed to assess the model’s
performance under varying levels of complexity and uncertainty:

  * •

simple: the workspace contains up to five monochromatic prismatic objects,
each placed at a considerable distance from one another. The task is to grasp
one of the objects.

  * •

clutter: the workspace contains five monochromatic prismatic objects randomly
placed in a cluttered arrangement. The task is to grasp all objects
successively.

  * •

novel objects: the workspace contains one unseen object selected from the YCB
dataset [30]. The task is to grasp this novel object.

For the real-world task, various everyday objects were deliberately positioned
in a physical workspace to validate the model’s real-world applicability. A
grasp was deemed successful across all tasks if the gripper enveloped the
object and lifted its center of mass. Illustrative examples from these tasks
are depicted in Fig. 1 and 3.

For training, all models were exclusively exposed to the simple scenario.
Importantly, the training dataset does not feature objects in close proximity,
with complex textures or in orientations divergent from an upright position.
NeRFs are trained with 2.5k scenes with images from 50 random perspectives for
500k epochs, grasp success estimators are trained with 512 scenes each with a
single demonstrated grasp for 400 epochs. The training of NeRFs took around 5
days and the training of grasp success estimators a couple of hours on an
NVIDIA RTX A6000.

We use the attention module of Transporter Networks (TN), as defined in [31]
as a baseline. This choice was motivated by its proven effectiveness in pick-
and-place tasks using limited training data similar to our training setup,
although it also requires depth information. The original Transporter Network
architecture [11] proposes an approach for inferring 6-DoF gripper poses for
object placement. Adapting this approach to grasping consists of estimating an
SE(2) grasp pose using the attention module of [31] and regressing the
remaining $z$-coordinate and roll and pitch angles. Regression of additional
rotational parameters was deemed infeasible due to the orientation limitations
of our training data. Regarding the $z$-coordinate, we found that estimation
methods were inaccurate, prompting us to rely on calculating the
$z$-coordinate from the depth value at the SE(2) grasp location derived from
the input RGB-D images. Additionally to the Transporter network we also train
grasp success estimators of the same architecture as $\Psi$ but without pre-
trained MVNeRFs. All baselines are trained for 400 epochs and took a couple of
hours to complete.

###  IV-A MVNeRF

Figure 3: MVNeRF renderings for the simulated tasks. Left: input images with
known camera parameters; middle: rendering of 1-view and 3-views MVNeRF;
right: ground truth generated in simulation. Note that depth information was
neither utilized in training nor in inference, and is displayed only for
visualization.

We trained two variants of MVNeRF: a single-view version (1-view),
functionally equivalent to VisionNeRF [22], and a multi-view version (3-views)
that processes three images concurrently. Both variants were applied in
simulated and real-world tasks (see Fig. 3 and Fig. 1). In the simple task,
both models produced highly recognizable renderings. However, the 3-views
model demonstrated superior levels of quality and detail in both RGB and depth
images. It should be noted that while depth images can be rendered using
NeRFs, they were neither used during the training nor as part of the input. In
the clutter task, both models retained the general shape of the clutter, but
the colors were blended, making the objects indistinguishable. The most
significant difference between the two models appeared in the novel objects
task: while the 1-view model generated blurry approximations of the objects,
the 3-views model rather captured their surface details. In the real-world
task, both models produced blurry but recognizable color images. But the depth
image rendered by 1-view captured the objects significantly better than the
depth from 3-views. These effects are most likely caused by sensor noise and
inaccuracies in the camera’s calibration. In this work, we primarily focus on
using NeRFs for grasping; a comprehensive quantitative analysis of MVNeRFs is
beyond the current scope.

###  IV-B Grasp Evaluation

Figure 4: Depiction of grasp value estimations in 6-DoF space. Left: a valid
grasp pose and the corners of the tx-ty slice (translational displacement
along x and y axes); right: visualization of negative grasp errors and
estimated grasp values across multiple slices in translational and rotational
dimensions. Interpretation of the slices: in the tx-ty slice of the negated
grasp error function, regions maintaining red hues signify deviations along
the y-axis still result in valid grasps. Bright white spots, corresponding to
the arms of the T-shaped object, are indicative of minimal translational
error, yet are not red due to maximal rotational error.

We trained four 6-DoF grasp evaluation models employing the $\Psi$
architecture for implicit grasp pose estimation. Two models utilized one view
(MV1) and three views (MV3) with their respective pre-trained MVNeRFs (1-views
and 3-views). Additionally, we trained two models without pre-trained NeRFs,
one using a single view (NO1) and another using three views (NO3). In case of
MV1 and NO1, we processed all three views available to MV3 and NO3
independently and averaged their results to obtain the final value as
suggested in in [15].

To ascertain the validity of our grasp evaluation, we define a surrogate
function for grasp probability: the negative grasp error. This function
computes translation and rotation errors relative to the nearest valid grasp
pose, averages them, and negates the result. The nearest grasp pose is
determined via an oracle with knowledge of object poses and valid grasps
within the simulation as described in [15]. Although this is an approximation,
it serves as a useful heuristic for showing the characteristics of the real
grasp probability.

Figure 4 illustrates slices of both the negative grasp errors and the outputs
of our trained models centered on a successful grasp pose. Our findings
indicate that models equipped with pre-trained MVNeRFs yield estimates more
similar to the negative grasp errors, particularly in rotational dimensions.
This observation is exemplified in a T-shaped object, where movement along the
y-axis preserves grasp validity, as illustrated in the tx-ty, ty-tz, ty-rx,
ty-ry, and ty-rz slices.

Our results suggest an implicit approximation of the set of successful grasps
is attainable. Additionally, the gradient properties of the slices indicate
suitability for gradient-based optimization methods, particularly for MV1 and
MV3, whereas NO1 and NO3 displayed satisfactory properties only in translation
slices.

###  IV-C Grasping in Simulation

The highest grasp success rate in the simple task was recorded for MV1 (0.88),
followed closely by MV3 and TN (see Table I). Both NO1 and NO3 displayed
notably inferior performance. In this task we had access to the oracle, thus
we also computed the translation and rotation errors. Despite TN’s
significantly lower translation and rotation errors (averages of 0.8mm and
3.2°), its performance lagged slightly behind MV1 (with 4.3mm and 10.7° errors
on average). This discrepancy could likely be attributed to two key factors:
(1) the objects in this task were geometrically simple, and thus more
forgiving of grasping errors; (2) the error function is not a direct surrogate
for grasp success, meaning that minimal errors at specific poses may still
lead to grasp failures, e.g. at the junction of the arms and the stem of the
T-shape, the gripper could collide with the object during approach and fail to
grasp it.

TABLE I:  Results in simulated tasks: grasp success rates for all tasks, average number of objects cleared, and average number of objects dropped in the clutter task | simple | clutter | novel objects
---|---|---|---
| success | success | cleared | dropped | success
TN | 0.84 | 0.58 | 4.2 | 0.2 | 0.35
NO1 | 0.4 | 0.24 | 2.4 | 1.2 | 0.07
NO3 | 0.4 | 0.12 | 1.2 | 1.2 | 0.11
MV1 | 0.88 | 0.58 | 4.4 | 0.4 | 0.44
MV3 | 0.84 | 0.57 | 4.0 | 1.0 | 0.50

In the clutter task, each model had 10 attempts to clear a cluttered scene
consisting of 5 objects. Their performance was measured by their grasp success
rate, the number of objects successfully cleared from the scene, and the
number of objects inadvertently removed from the workspace (e.g., dropped from
the table). The results are shown in Table I. MV1 and TN achieved the highest
success rates; however, MV1 demonstrated a somewhat better capability in
clearing objects, while TN dropped slightly fewer objects. The performance of
MV3 lagged behind that of MV1 and TN, and both NO1 and NO3 demonstrated
significantly poorer results.

The strong performance of TN, a model restricted to 4-DoF grasps, suggests
that the clutter task was relatively straightforward using top-down grasping
strategies. This is likely attributable to the geometric simplicity of the
objects, as well as their potential to land in favorable orientations
following either failed or successful grasp attempts. Across all models, the
majority of failed attempts occurred in proximity to other objects,
subsequently altering the scene’s configuration.

The novel objects task presented a higher level of difficulty. The task
involved grasping one of the following YCB objects: banana, foam brick,
gelatin box, hammer, Master Chef can, pear, power drill, strawberry and tennis
ball. These objects did not only differ substantially in shape from the
prismatic objects in the training data but also feature complex textures as
opposed to the monochromatic objects used for training. Despite these
complexities, models MV1 and MV3 were notably effective, achieving grasp
success rates of 44% and 50%, respectively as shown in Table I. TN, restricted
to 4-DoF grasps, demonstrated lower effectiveness and models NO1 and NO3
managed to grasp only a small fraction of the novel objects.

Objects with simple geometries and colors like the banana and the hammer were
reliably grasped by MV1, MV3 and TN. Surprisingly TN failed to grasp the
tennis ball every time, while both MV models were very good at it. All models
failed at grasping objects with more complex textures, like the Master Chef
can and the gelatin box. The foam brick was also only grasped rarely, likely
due to its dark color blending into the ground. The primary reason for
unsuccessful grasps for both MV1 and MV3 was object slippage within the
gripper whereas the failures of TNs were primarily due to collisions.

The results indicate that models MV1 and MV3 capture a more generalized
representation of robotic grasping, and show the utility of leveraging pre-
trained Neural Radiance Fields (NeRFs) as a foundational architecture for
implicit grasp models. The fact that MV1 mostly outperforms MV3 warrants
further investigation; possible explanations could include the single-image-
trained NeRF’s necessity for stronger object shape generalization, or an
ensemble effect produced by combining the outputs for three different inputs
during grasp evaluation.

###  IV-D Real-World Grasping

The real-world setup, consisting of a workbench and a UR10e robot, is similar
to the simulation but has two key differences: it employs a RobotiQ 2F-140
gripper rather than the simulated 2F-85, and it includes an Intel RealSense
D415 camera on the robot’s wrist for data collection.

For the real-world task, we selected a variety of everyday objects: tennis
ball, crochet ball, small Lego tire, large Lego tire, can of beans, rubber
duck, hiking boot, power drill, shampoo bottle and a 3d printed block. Each
object was subjected to four trials. During each trial, the object was
randomly placed within one of four designated quadrants on the workbench. We
only tested models trained in simulation. Models NO1 and NO3 were excluded
from real-world testing due to poor performance in simulated trials.

Among the tested models, only MV1 was able to successfully execute grasps.
However, it failed to grasp dark-colored Lego tires that blended with the
environment, consistent with the findings of the novel objects. Aside from
these, MV1 achieved a success rate exceeding 50%. The tennis and crochet balls
were consistently grasped in all trials. The can of beans, rubber duck, hiking
boot, and 3D-printed block were grasped in half of the trials, while the
shampoo bottle and power drill were successfully grasped only once of four
times. Failures often occurred in close spatial proximity to the target
object. The most common failure mode was slight misplacement of the grasp,
leading to slippage, particularly with heavier objects like the drill, boot,
shampoo bottle, and can of beans.

Although some grasp attempts by the MV3 model seemed promising, they
ultimately failed due to too low z-axis positioning, causing collision between
the gripper and the workbench. Other attempts strayed off to the workspace
boundaries. We hypothesize that these inconsistencies may arise from camera
calibration inaccuracies, as the MVNeRFs model relies heavily on both
extrinsic and intrinsic camera parameters for representing visual and
geometric features.

TNs consistently initiated grasp attempts in a single corner of the workspace.
This behavior may stem from the model’s strong reliance on visual features and
a likely substantial mismatch in the data distribution between real-world and
simulated images.

The MV1 model’s successful real-world grasps demonstrate the effectiveness of
our implicit approach, which relies on NeRFs for geometric and visual feature
representation. Yet, MV3’s consistent failures suggest the method’s
sensitivity to camera calibration. Both MV1 and MV3 process three images but
differently: MV1 treats each image independently, like an ensemble model,
while MV3 combines information from all three. This difference could explain
the varying impact of camera calibration errors on their performance.

##  V Conclusion

In this work, we demonstrated that implicit model architectures, supported by
a pretrained NeRF backbone, are effective in learning robotic grasping tasks.
Our approach displayed robust generalization capabilities, scaling from 4-DoF
to 6-DoF grasps across different objects and tasks. Furthermore, it
demonstrated transferability from simulation to real-world conditions without
any prior exposure to such data.

While our method yields promising results, it is not without constraints. The
need to pre-train the NeRF backbone imposes an initial computational burden,
and our model’s efficacy is intrinsically tied to NeRF’s capabilities in scene
representation as well as the quality of the grasp optimization landscape.
Furthermore, the confined workspace in our experiments raises questions not
just about generalization, but also about the limitations of NeRF’s capability
to represent larger or more complex scenes. Our experimental setup is also
geared towards grasping in general, lacking task-specific goal orientation,
thereby narrowing the scope of its applicability.

Despite these limitations, our model’s ability to generalize from 4-DoF to
6-DoF grasps and from simulation to real-world settings implies that it could
learn more complex tasks, possibly requiring only a modest dataset for
training. Future work could involve integrating task-specific goals, language-
conditioning, or a closed-loop control system for more precise manipulation.
Additionally, the geometric features provided by NeRFs can be leveraged for
motion planning, offering an additional way to improve robotic capabilities.

Lastly, one of the unique aspects of our approach is its potential
interpretability. Should the model encounter failure cases, the internal
rendering capabilities of NeRFs could provide valuable insights into the
underlying causes.

## References

  * [1] S. Levine, P. Pastor, A. Krizhevsky, J. Ibarz, and D. Quillen, “Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection,” _The International journal of robotics research_ , vol. 37, no. 4-5, pp. 421–436, 2018.
  * [2] S. Song, A. Zeng, J. Lee, and T. Funkhouser, “Grasping in the wild: Learning 6dof closed-loop grasping from low-cost demonstrations,” _IEEE Robotics and Automation Letters_ , vol. 5, no. 3, pp. 4978–4985, 2020.
  * [3] A. Zeng, S. Song, K.-T. Yu, E. Donlon, F. R. Hogan, M. Bauza, D. Ma, O. Taylor, M. Liu, E. Romo _et al._ , “Robotic pick-and-place of novel objects in clutter with multi-affordance grasping and cross-domain image matching,” _The International Journal of Robotics Research_ , vol. 41, no. 7, pp. 690–705, 2022.
  * [4] D. Horváth, K. Bocsi, G. Erdős, and Z. Istenes, “Sim2real grasp pose estimation for adaptive robotic applications,” _arXiv preprint arXiv:2211.01048_ , 2022.
  * [5] M. Weisenböhler, B. Hein, and C. Wurll, “On scene engineering and domain randomization: Synthetic data for industrial item picking,” in _International Conference on Intelligent Autonomous Systems_. Springer, 2022, pp. 643–660.
  * [6] A. Hussein, M. M. Gaber, E. Elyan, and C. Jayne, “Imitation learning: A survey of learning methods,” _ACM Computing Surveys (CSUR)_ , vol. 50, no. 2, pp. 1–35, 2017.
  * [7] B. Fang, S. Jia, D. Guo, M. Xu, S. Wen, and F. Sun, “Survey of imitation learning for robotic manipulation,” _International Journal of Intelligent Robotics and Applications_ , vol. 3, pp. 362–369, 2019.
  * [8] J. Kober, J. A. Bagnell, and J. Peters, “Reinforcement learning in robotics: A survey,” _The International Journal of Robotics Research_ , vol. 32, no. 11, pp. 1238–1274, 2013.
  * [9] H. Nguyen and H. La, “Review of deep reinforcement learning for robot manipulation,” in _2019 Third IEEE International Conference on Robotic Computing (IRC)_. IEEE, 2019, pp. 590–595.
  * [10] R. Rahmatizadeh, P. Abolghasemi, L. Bölöni, and S. Levine, “Vision-based multi-task manipulation for inexpensive robots using end-to-end learning from demonstration,” in _2018 IEEE international conference on robotics and automation (ICRA)_. IEEE, 2018, pp. 3758–3765.
  * [11] A. Zeng, P. Florence, J. Tompson, S. Welker, J. Chien, M. Attarian, T. Armstrong, I. Krasin, D. Duong, V. Sindhwani _et al._ , “Transporter networks: Rearranging the visual world for robotic manipulation,” in _Conference on Robot Learning_. PMLR, 2021, pp. 726–747.
  * [12] P. Florence, L. Manuelli, and R. Tedrake, “Self-supervised correspondence in visuomotor policy learning,” _IEEE Robotics and Automation Letters_ , vol. 5, no. 2, pp. 492–499, 2019.
  * [13] T. Zhang, Z. McCarthy, O. Jow, D. Lee, X. Chen, K. Goldberg, and P. Abbeel, “Deep imitation learning for complex manipulation tasks from virtual reality teleoperation,” in _2018 IEEE International Conference on Robotics and Automation (ICRA)_. IEEE, 2018, pp. 5628–5635.
  * [14] P. Florence, C. Lynch, A. Zeng, O. A. Ramirez, A. Wahid, L. Downs, A. Wong, J. Lee, I. Mordatch, and J. Tompson, “Implicit behavioral cloning,” in _Conference on Robot Learning_. PMLR, 2022, pp. 158–168.
  * [15] G. Sóti, B. Hein, and C. Wurll, “Gradient based grasp pose optimization on a nerf that approximates grasp success,” in _Intelligent Autonomous Systems 18_. Springer, 2023.
  * [16] T. Weng, D. Held, F. Meier, and M. Mukadam, “Neural grasp distance fields for robot manipulation,” in _2023 IEEE International Conference on Robotics and Automation (ICRA)_. IEEE, 2023, pp. 1814–1821.
  * [17] J. Ichnowski, Y. Avigal, J. Kerr, and K. Goldberg, “Dex-nerf: Using a neural radiance field to grasp transparent objects,” _arXiv preprint arXiv:2110.14217_ , 2021.
  * [18] J. Kerr, L. Fu, H. Huang, Y. Avigal, M. Tancik, J. Ichnowski, A. Kanazawa, and K. Goldberg, “Evo-nerf: Evolving nerf for sequential robot grasping of transparent objects,” in _6th Annual Conference on Robot Learning_ , 2022.
  * [19] Q. Dai, Y. Zhu, Y. Geng, C. Ruan, J. Zhang, and H. Wang, “Graspnerf: multiview-based 6-dof grasp detection for transparent and specular objects using generalizable nerf,” in _2023 IEEE International Conference on Robotics and Automation (ICRA)_. IEEE, 2023, pp. 1757–1763.
  * [20] B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng, “Nerf: Representing scenes as neural radiance fields for view synthesis,” _Communications of the ACM_ , vol. 65, no. 1, pp. 99–106, 2021.
  * [21] A. Yu, V. Ye, M. Tancik, and A. Kanazawa, “pixelnerf: Neural radiance fields from one or few images,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , 2021, pp. 4578–4587.
  * [22] K.-E. Lin, Y.-C. Lin, W.-S. Lai, T.-Y. Lin, Y.-C. Shih, and R. Ramamoorthi, “Vision transformer for nerf-based view synthesis from a single input image,” in _Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision_ , 2023, pp. 806–815.
  * [23] J. Kerr, C. M. Kim, K. Goldberg, A. Kanazawa, and M. Tancik, “Lerf: Language embedded radiance fields,” _arXiv preprint arXiv:2303.09553_ , 2023.
  * [24] J. Cen, Z. Zhou, J. Fang, W. Shen, L. Xie, X. Zhang, and Q. Tian, “Segment anything in 3d with nerfs,” _arXiv preprint arXiv:2304.12308_ , 2023.
  * [25] J. Chibane, G. Pons-Moll _et al._ , “Neural unsigned distance fields for implicit function learning,” _Advances in Neural Information Processing Systems_ , vol. 33, pp. 21 638–21 652, 2020.
  * [26] L. Mescheder, M. Oechsle, M. Niemeyer, S. Nowozin, and A. Geiger, “Occupancy networks: Learning 3d reconstruction in function space,” in _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , 2019, pp. 4460–4470.
  * [27] M. Adamkiewicz, T. Chen, A. Caccavale, R. Gardner, P. Culbertson, J. Bohg, and M. Schwager, “Vision-only robot navigation in a neural radiance world,” _IEEE Robotics and Automation Letters_ , vol. 7, no. 2, pp. 4606–4613, 2022.
  * [28] R. Wightman, “Pytorch image models,” https://github.com/rwightman/pytorch-image-models, 2019.
  * [29] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” _arXiv preprint arXiv:1412.6980_ , 2014.
  * [30] B. Calli, A. Singh, A. Walsman, S. Srinivasa, P. Abbeel, and A. M. Dollar, “The ycb object and model set: Towards common benchmarks for manipulation research,” in _2015 international conference on advanced robotics (ICAR)_. IEEE, 2015, pp. 510–517.
  * [31] G. Sóti, X. Huang, C. Wurll, and B. Hein, “Train what you know–precise pick-and-place with transporter networks,” _arXiv preprint arXiv:2302.09000_ , 2023.


# A new class of viable and exact solutions of EFE’s with Karmarkar
conditions: An application to cold star modeling

Neeraj Pant1, Megandhren Govender2, & Satyanarayana Gedela3 1,3Department of
Mathematics, National Defence Academy, Khadakwasla, Pune-411023, India  2
Department of Mathematics, Faculty of Applied Sciences, Durban University of
Technology, Durban, South Africa  3 Department of Mathematics, SSJ Campus,
Kumaun University, Almora-263601, India<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

In this work we present a theoretical framework within Einstein’s classical
general relativity which models stellar compact objects such as PSR J1614-2230
and SAX J1808.4-3658. The Einstein field equations are solved by assuming that
the interior of the compact object is described by a class I spacetime. The
so-called Karmarkar condition arising from this requirement is integrated to
reduce the gravitational behaviour to a single generating function. By
appealing to physics we adopt a form for the gravitational potential which is
sufficiently robust to accurately describe compact objects. Our model
satisfies all the requirements for physically realistic stellar structures.

††:

  * August 2020

Keywords: Compact star, anisotropy, embedding class, Einstein field equations,
adiabatic index.

##  1 Introduction

Since the publication of Einstein’s general relativity in 1914, researchers
were captivated by the search for exact solutions of the field equations. Over
the past century a myriad of exact solutions were obtained which attempted to
explain observations in cosmology and astrophysics. The gravitational field
exterior to a static, spherically symmetric star was first obtained by
Schwarzschild in 1916. This vacuum solution was followed by the interior
Schwarzschild solution which describes the gravitational field of a uniform
density sphere [Schwarzschild (1916a, b)]. Causality is one of the
cornerstones of relativity which requires $0<\frac{dp}{d\rho}<1$ [Dev &
Gleiser (2002), Dev & Gleiser  (2003)]. It is clear that causality is violated
at each interior point of the Schwarzschild constant density sphere. This
prompted researchers to consider more realistic matter configurations which
included inhomogeneous density profiles, anisotropic pressures, electric
charge, bulk viscosity and scalar fields. Generalization of the perfect fluid
interior matter distribution to include anisotropic stresses has yielded
interesting physical characteristics of such models. It was shown that
physical properties such as surface tension, compactness and surface red-shift
of these stars are sensitive to the anisotropy parameter [Sharma & Maharaj
(2007), Bowers & Liang  (1974), Maurya & Govender  (2017), Pant et al
(2016)]. The impact of electric charge in compact objects has been widely
studied within the context of stability and physical viability. It was shown
that the presence of electric charged alters the Buchdahl limit required for
stability of a self-gravitating, bounded matter distribution [Singh et al
(2016), Andreasson et al  (2012)]. Departure from spherical symmetry has also
been pursued in the context of slowly rotating stars and in the description of
gravitational waves [Herrera et al  (2005a, b)]. Various techniques ranging
from ad-hoc assumptions, imposition of pressure isotropy, use of an equation
of state, use of the condition of conformal flatness, Lie symmetry analysis,
to name just a few, were used to solve the field equations [Manjonjo et al
(2018), Ivanov  (2018)]. While these methods yield solutions, there is no
guarantee that the ensuing models are physically viable. An extensive review
of exact solutions of the Einstein field equations describing static objects
show that a very small subset of these satisfy all the requirements for
realistic stellar models [Stephani et al  (2003)].

A natural question which arises in astrophysics is what happens when a star
loses hydrostatic equilibrium and undergoes continued gravitational collapse?
Oppenheimer and Snyder tackled this problem by considering a spherically
symmetric dust cloud undergoing gravitational collapse [Oppenheimer & Snyder
(1939)]. Their model served as a catalyst in understanding end-states of
gravitational collapse. The Cosmic Censorship Conjecture which ruled out the
formation of naked singularities for collapsing matter configurations with
reasonable initial states was shown to be violated under various assumptions
[Guo & Joshi  (2015), Ghosh & Maharaj  (2015), Sherif et al  (2019)]. The
study of black holes has moved into the observable realm making it a popular
research topic [Akiyama et al  (2019)]. Black hole physics has evolved
immensely from the simple Oppenheimer-Snyder dust model to include anisotropic
pressures, electromagnetic field, cosmological constant as well as higher
dimensions.

In the paper Vaidya  (1951) presented an exact solution describing the
exterior gravitational field of a radiating star. This solution is a unique
solution of the Einstein field equations describing a spherically symmetric
atmosphere composed of null radiation. The Vaidya solution made it possible to
model dissipative collapse in which the collapsing core radiates energy to the
exterior spacetime in the form of a radial heat flux or null radiation. There
were several early attempts at modeling a radiating star with a Vaidya
exterior. The problem was the matching of the interior and exterior spacetimes
across the boundary of the star. The junction conditions required for the
smooth matching of a spherically symmetric, shear-free line element to
Vaidya’s outgoing solution was provided by Santos  (1985). It was shown that
for a radiating spherical body dissipating energy in the form of a radial heat
flux, the pressure on the boundary is proportional to the magnitude of the
heat flux. This condition ensures conservation of momentum across the boundary
of the collapsing body. Since the publication of the Santos junction
conditions, there has been an explosion of models describing dissipative
collapse starting with simple solutions and thus rapidly developing into more
sophisticated stellar models. The authors Herrera et al  (1989), Chan et al
(1994), Di Prisco et al  (2007), Herrera & Martinez  (1998), Di Prisco et al
(1997) have been instrumental in investigating the nature of collapse with
dissipation within a general framework thus giving researchers rich insights
into these problems especially with the inclusion of shear, inhomogeneity and
anisotropy. The thermodynamics of radiating stars was developed by Govender
and co-workers since the early 1990’s. Relaxational effects due to heat
dissipation and shear viscosity predict temperature and luminosity profiles
which are significantly different from the Eckart theory of thermodynamics
[Govender et al  (2010), Govender  (2013), Govender & Govinder  (2001)].
Recently, there has been a resurgence in seeking exact solutions to the
Einstein field equations describing static, compact objects by employing the
concept of embedding. The Karmarkar condition which needs to be satisfied if
the spacetime has to be of class I embedding has been widely used to generate
various stellar models describing anisotropic spheres [Karmarkar  (1948)].
These models have been shown to satisfy all the stringent stability and
physical tests imposed by the behaviour of the thermodynamic and gravitational
variables [Bhar  (2019), TellOrtiz et al  (2019), Maurya et al  (2019a), Jasim
et al (2020), Sing et al (2020), Gedela et al (2020), Ivano  (2020), Sarkar et
al (2020)]. Many of these solutions have been reconciled with observational
data of compact objects including strange stars, pulsars and neutron stars
[Gedela et al  (2018, 2019a, 2019b), Upreti et al  (2020), Fuloria (2017),
Pant et al  (2020)]. By utilising a quadratic equation of state together with
the Karmarkar condition a model for the strange star candidate SAX
J1808.4-3658 was obtained. It was shown that this model agrees with
observational characteristics of this star. Furthermore, a comparison of the
quadratic EoS model with modified Bose-Einstein condensation EoS and linear
EoS was carried out Gedela et al  (2019c). The Karmarkar condition has also
been utilised to model dissipative collapse ensuing from an initially static
configuration losing hydrostatic equilibrium and starts to radiate energy to
the exterior spacetime. The Karmarkar condition together with the junction
condition which represents conservation of momentum across the collapsing
boundary determine the temporal and gravitational evolution of the model
[Naidu et al  (2018)]. Many of these models indicate their robustness under
the scrutiny of physical viability. To this end we employ the Karmarkar
condition to seek a model which accurately describes two stellar compact
objects, namely, PSR J1614-2230 and SAX J1808.4-3658.

This paper is structured as follows: In section I, we present the Einstein
field equations describing the interior spacetime of the stellar model. The
Karmarkar and embedding class I conditions are introduced in section III. By
adopting a parametric form for one of the metric potentials we generate a
stellar model in section IV. The matching of the interior and exterior
spacetimes is accomplished in section V. The physical features of the model is
discussed in section VI. We investigate the stability of our model in section
VII. The paper concludes with a discussion and finding of our main results in
section VIII.

##  2 The Einstein Field Equations

The line element within the spherically symmetric anisotropic fluid matter
distribution in Schwarzschild coordinates $(x^{i})=(t,r,\theta,\phi)$ is
delineated in the following form:

$ds^{2}=e^{\nu(r)}dt^{2}-e^{\lambda(r)}dr^{2}-r^{2}(d\theta^{2}+\sin^{2}{\theta}d\phi^{2}).$
(1)

where the gravitational potentials $\nu(r)$ and $\lambda(r)$ are yet unknown.
The energy-momentum tensor for anisotropic matter takes the form

$T_{jk}=[(p_{t}+\rho)v_{j}v_{k}-p_{t}g_{jk}+(p_{r}-p_{t})\chi_{j}\chi_{k}],$
(2)

where $\rho$, $p_{r}$ and $p_{t}$ are the energy density, radial and
transverse pressures respectively and $p_{t}$ is in the perpendicular
direction to $p_{r}$. The normalized 4-velocity vector
$v^{j}=\sqrt{\frac{1}{g_{tt}}}\delta_{t}^{j}$ and the unit spacelike vector
$\chi^{j}=\sqrt{-\frac{1}{g_{rr}}}\delta_{r}^{j}$ along $r$ provide
$g_{jk}v^{j}v^{k}=1$ and $g_{jk}\chi^{j}\chi^{k}=-1$ respectively.

The line element (1) and momentum tensor $T_{jk}$ (2) give rise to the
following system of equations [Maurya et al  (2019c)]

$\displaystyle 8\pi\rho$ $\displaystyle=$
$\displaystyle\frac{\left(1-e^{-\lambda(r)}\right)}{r^{2}}+\frac{\lambda^{\prime}(r)e^{-\lambda(r)}}{r},$
(3) $\displaystyle 8\pi p_{r}$ $\displaystyle=$
$\displaystyle\frac{\nu^{\prime}(r)e^{-\lambda(r)}}{r}-\frac{\left(1-e^{-\lambda(r)}\right)}{r^{2}},$
(4) $\displaystyle 8\pi
p_{t}=\frac{e^{-\lambda}}{4}\left(2\nu^{\prime\prime}+{\nu^{\prime}}^{2}-\nu^{\prime}\lambda^{\prime}+\frac{2\nu^{\prime}}{r}-\frac{2\lambda^{\prime}}{r}\right),$
(5)

where $(^{\prime})$ denotes the derivative with respect to the radial
coordinate $r$.

Using the field equations Eqs.(4) and (5), the anisotropic factor $(\Delta)$
takes the form

$\displaystyle\Delta$ $\displaystyle=$ $\displaystyle p_{t}-p_{r}$ (6)
$\displaystyle=$ $\displaystyle e^{-\lambda}\left[{\nu^{\prime\prime}\over
2}-{\lambda^{\prime}\nu^{\prime}\over 4}+{\nu^{\prime 2}\over
4}-{\nu^{\prime}+\lambda^{\prime}\over 2r}+{e^{\lambda}-1\over r^{2}}\right].$

Here we choose the gravitational constant $G$ and speed of sound $c$ to be
unity.

##  3 The Karmarkar condition

The Karmarkar condition required for the spacetime to be of class I embedding
is

$R_{1414}=\frac{R_{1212}R_{3434}+R_{1224}R_{1334}}{R_{2323}},$ (7)

subject to $R_{2323}\neq 0$ [Pandey & Sharma  (1981)].

The non-zero Riemann tensor components for the line element (1) are

$\displaystyle R_{1414}$ $\displaystyle=$
$\displaystyle-e^{\nu(r)}(\frac{\nu^{{}^{\prime\prime}}(r)}{2}+\frac{\nu{{}^{\prime}}^{2}(r)}{4}-\frac{\lambda^{\prime}(r)\nu^{\prime}(r)}{4}),$
(8) $\displaystyle R_{2323}$ $\displaystyle=$
$\displaystyle-e^{-\lambda(r)}r^{2}sin^{2}{\theta}(e^{\lambda(r)}-1),$ (9)
$\displaystyle R_{1212}$ $\displaystyle=$
$\displaystyle\frac{1}{2}r{\lambda}^{\prime}(r),$ (10) $\displaystyle
R_{3434}$ $\displaystyle=$
$\displaystyle-\frac{1}{2}r\sin^{2}{\theta}\nu^{\prime}(r)e^{\nu(r)-\lambda(r)}.$
(11)

The differential equation derived using the Karmarkar condition (7) assumes
the form

$\frac{2\nu^{{}^{\prime\prime}}}{\nu^{\prime}}+\nu^{\prime}=\frac{\lambda^{\prime}e^{\lambda(r)}}{e^{\lambda(r)}-1}.$
(12)

Solving eqn.(12), we find the following relation between $e^{\lambda(r)}$ and
$e^{\nu(r)}$

$e^{\lambda(r)}=\Big{(}P+Q\int_{0}^{r}\sqrt{e^{\lambda(r)}-1}dr\Big{)}^{2},$
(13)

where $P$ and $Q$ are integration constants.

In view of (6), the anisotropy of the fluid $\Delta$ [Maurya et al (2016)] is
obtained as

$\Delta=\frac{\nu{{}^{\prime}}(r)}{4e^{\lambda(r)}}\Big{[}\frac{2}{r}-\frac{\lambda^{\prime}(r)}{e^{\lambda(r)}-1}\Big{]}\Big{[}\frac{\nu^{\prime}(r)e^{\nu(r)}}{2rB^{2}}-1\Big{]}.$
(14)

At this juncture we should point out that when $\Delta=0$, the only bounded
solution simultaneously satisfying the Karmarkar condition and pressure
isotropy is the interior Schwarzschild solution. This solution suffers various
shortcomings including superluminal speeds within the interior of the fluid.
To this end we consider a solution describing an anisotropic fluid
distribution which will be taken up in the next section.

##  4 A new parametric class solutions

In this paper, we assumed the following metric potential

$\displaystyle e^{\lambda(r)}$ $\displaystyle=$ $\displaystyle
1+ar^{2}\alpha_{n}(r),$ (15)

where

$\displaystyle\alpha_{n}(r)$ $\displaystyle=$
$\displaystyle\csc^{n}\left(br^{2}+c\right),$

and $a$, $b$ and $c$ are positive constants and $n\geq 0$. We have selected
$e^{\lambda(r)}$ such that at center $e^{\lambda(r)}=1$, which emphasizes that
at the center the tangent 3 space is flat and the Einstein field equations
(EFEs) can be integrated. Substituting the $e^{\lambda(r)}$ from (15) in (13),
we obtain the remaining metric potential $e^{\nu(r)}$ as

$\displaystyle e^{\nu(r)}$ $\displaystyle=$
$\displaystyle\left(P-\frac{Qh_{1}(r)h_{2}(r)\sqrt{a\alpha_{n}(r)}}{4b}\right)^{2},$
(16)

where $P$ and $Q$ are integration constants.

Using the metric potentials given by Eqs. (15) and (16), the expressions of
$\rho$, $p_{r}$, $\Delta$ and $p_{t}$ can be cast as

$\displaystyle\rho$ $\displaystyle=$
$\displaystyle\frac{a\alpha_{n}(r)\left(r^{2}\left(a\alpha_{n}(r)-2bn\cot\left(br^{2}+c\right)\right)+3\right)}{\left(ar^{2}\alpha_{n}(r)+1\right){}^{2}},$
$\displaystyle p_{r}$ $\displaystyle=$
$\displaystyle\frac{h_{2}(r)\sqrt{a\alpha_{n}(r)}}{h_{3}(r)\left(ar^{2}\alpha_{n}(r)+1\right)},$
(18)

$\displaystyle\Delta$ $\displaystyle=$
$\displaystyle\frac{h_{5}(r)r^{2}\left(2bh_{6}(r)-h_{7}(r)\right)}{h_{8}(r)\left(1+ar^{2}\alpha_{n}(r)\right)^{2}},$
$\displaystyle p_{t}=p_{r}+\Delta,$ (20)

where

$\displaystyle h_{1}(r)$ $\displaystyle=$
$\,{}_{2}F_{1}\left(\frac{1}{2},\frac{n+2}{4};\frac{3}{2};\cos^{2}\left(br^{2}+c\right)\right),$
$\displaystyle h_{2}(r)$ $\displaystyle=$
$\displaystyle\sin\left(2\left(br^{2}+c\right)\right)\sin^{2}\left(br^{2}+c\right)^{\frac{n-2}{4}},$
$\displaystyle h_{3}(r)$ $\displaystyle=$ $\displaystyle
2Pb\sqrt{a\alpha_{n}}-aQh_{1}(r)\sqrt{\alpha_{n}}\cos\left(br^{2}+c\right)$
$\displaystyle-4bQ,$ $\displaystyle h_{4}(r)$ $\displaystyle=$
$\displaystyle\sqrt{a}Qh_{1}(r)\cos\left(br^{2}+c\right)-2Pb$ $\displaystyle
h_{5}(r)$ $\displaystyle=$ $\displaystyle
a\alpha_{n}(r)+bn\cot\left(br^{2}+c\right)$ $\displaystyle h_{6}(r)$
$\displaystyle=$ $\displaystyle aP\alpha_{n}(r)-Q\sqrt{a\alpha_{n}(r)}$
$\displaystyle h_{7}(r)$ $\displaystyle=$ $\displaystyle
aBh_{4}(r)\cos\left(br^{2}+c\right)\csc^{\frac{n}{2}}\left(br^{2}+c\right)$
$\displaystyle h_{8}(r)$ $\displaystyle=$ $\displaystyle
2Pb-\sqrt{a}Qh_{1}(r)\cos\left(br^{2}+c\right)$

The mass function $m(r)$, gravitational red-shift $z(r)$ and compactification
factor $u(r)$ at the surface and within the interior of the stellar system are
given by

$\displaystyle m(r)$ $\displaystyle=$
$\displaystyle\frac{ar^{3}\alpha_{n}(r)}{2\left(ar^{2}\alpha_{n}(r)+1\right)},$
(21) $\displaystyle z(r)$ $\displaystyle=$
$\displaystyle\frac{1}{P-\frac{Qh_{1}(r)h_{2}(r)\sqrt{a\alpha_{n}(r)}}{4b}}-1,$
(22) $\displaystyle u(r)$ $\displaystyle=$
$\displaystyle\frac{m(r)}{r}=\frac{ar^{2}\alpha_{n}(r)}{2\left(ar^{2}\alpha_{n}(r)+1\right)}.$
(23)

##  5 Matching of interior and exterior spacetime over the boundary

To determine the constants $a,~{}b,~{}c,~{}P,~{}Q$ appearing in our class of
solutions, the interior metric must be matched smoothly across the boundary
with the exterior Schwarz-schild solution

$\displaystyle ds^{2}$ $\displaystyle=$ $\displaystyle\Big{(}1-{2M\over
r}\Big{)}dt^{2}-\Big{(}1-{2M\over r}\Big{)}^{-1}dr^{2}$ (24) $\displaystyle-$
$\displaystyle r^{2}(d\theta^{2}+\sin^{2}\theta d\phi^{2}).$

By comparing the interior solution (1) with exterior solution (24) at the
boundary $r=R$ (Darmois-Isreali conditions), we obtain

$\displaystyle e^{\nu_{b}}$ $\displaystyle=$ $\displaystyle 1-{2M\over R}$
$\displaystyle=$
$\displaystyle\left(P+\frac{Q\left(n\sqrt{1-\gamma}+2bR^{2}+2c\right)\sqrt{a\alpha_{n}(R)}}{b\left(n^{2}+4\right)}\right)^{2},$

$\displaystyle e^{-\lambda(r)_{b}}=1-{2M\over
R}=\frac{1}{1+aR^{2}\alpha_{n}(R)},$ (26) $\displaystyle p_{r}(R)=0.$ (27)

With the help of the boundary conditions (LABEL:bou1-27), we obtain

$\displaystyle a$ $\displaystyle=$
$\displaystyle-\frac{2M\csc^{-n}\left(bR^{2}+c\right)}{R^{2}(2M-R)},$ (28)
$\displaystyle P$ $\displaystyle=$
$\displaystyle\frac{\sqrt{1-\frac{2M}{R}}\left(ah_{1}(R)\cos\left(bR^{2}+c\right)\sqrt{\alpha_{n}(R)}+4b\right)}{4b},$
$\displaystyle Q$ $\displaystyle=$
$\displaystyle\frac{1}{2}\sqrt{1-\frac{2M}{R}}\sqrt{a\csc^{n}\left(bR^{2}+c\right)},$
(30)

where $\gamma=\left(bR^{2}+c\right)^{2}$.

The constants $b$ and $c$ are free parameters and are selected such a way that
all the physical properties of the assumed stars for a suitable range of $n$
are well-behaved and satisfy the Darmois-Israel conditions. The values of $P$
and $Q$ are expressed in Eqs. (LABEL:P) and (30) respectively.

##  6 Discussion of physical features for well-behaved solutions

###  6.1 Geometrical regularity

The metric potentials (geometrical parameters) for the stars PSR J1614-2230
and SAX J1808.4-3658 for the range of $n$ mentioned in Table 1 at the center
$(r=0)$, give the values $e^{\nu}|_{r=0}=$ positive constant and
$e^{-\lambda(r)}|_{r=0}=1$. This shows that the metric potentials are regular
and free from geometric singularities inside the stars. Also, both metric
potentials $e^{\nu}(r)$ and $e^{-\lambda(r)}$ are monotonically increasing and
decreasing respectively, with $r$ (Fig.1).

###  6.2 Viable trends of physical parameters

####  6.2.1 Density and pressure trends

The matter density $\rho$, radial pressure $p_{r}$ and transverse pressure
$p_{t}$ for stars PSR J1614-2230 and SAX J1808.4-3658 are non-negative inside
the stars and monotonically decrease from center to surface of these stars for
the range of $n$ mentioned in Table 1(Fig.2,Fig.3) [Zeldovich & Novikov
(1971), Ivano  (2002)].

####  6.2.2 Relation between pressure-density ratios (Equation of state)

We plot the graphs of the equation of state parameters
($p_{r}/\rho,~{}p_{t}/\rho$) to establish some connection between density and
the pressures. Using the trend of plots, we establish a linear, quadratic or
CFL EoS for our model. An example of starting off with the metric functions
and then establishing an EoS is the classic paper by Mukherjee et al  (1997).
In this work they show that the Vaidya-Tikekar geometry leads to a linear EoS.
From the plots of figures, we observe the decreasing trend of pressure to
density ratios with $r$ Fig.(4) for both the stars PSR J1614-2230 and SAX
J1808.4-3658 for the range of $n$ mentioned in Table 1. Based on the trends of
the plots, we calculate equation of state (EOS) for neutron star PSR
J1614-2230 as

$\displaystyle p_{r}$ $\displaystyle=$ $\displaystyle
0.861538\rho^{2}+0.206369\rho-0.00223306,$ (31) $\displaystyle p_{r}$
$\displaystyle=$ $\displaystyle 69.1848\rho^{2}-1.27803\rho+0.00560289,$ (32)

for $n=13.5$, $n=28.98$ respectively and for the strange star SAX J1808.4-3658
as

$\displaystyle p_{r}$ $\displaystyle=$ $\displaystyle
0.276979\rho^{2}+0.155325\rho-0.00151322,$ (33) $\displaystyle p_{r}$
$\displaystyle=$ $\displaystyle 48.6746\rho^{2}-0.639035\rho+0.00149093,$ (34)

for $n=9.56$, $n=20.3$ respectively, using the method of least of square
technique (elaborated in appendix). The profiles of equation of state for PSR
J1614-2230 ($n=13.5$ ), SAX J1808.4-3658 ($n=9.56$) are exhibited in the
Fig.(5). The trends of EOS for other values of $n$ in their corresponding
ranges of the stars remain same as in the Fig.(5).

####  6.2.3 Mass-radius relation, red-shift and compactification factor

The mass function $m(r)$ and gravitational red-shift $z(r)$ function of stars
PSR J1614-2230 and SAX J1808.4-3658 for the range of $n$ mentioned in Table 1
are increasing and decreasing respectively with $r$. The variation of $m(r)$
and $z(r)$ is shown in Figs.(6,7). Also, compactification parameter $u(r)$ for
both the stars are increasing functions with $r$, shown in Fig.(8) and lies
within the Buchdahl limit [Buchdahl  (1959)].

####  6.2.4 Anisotropic parameter

In Fig.(9), the radial pressures ($p_{r}$) coincides with tangential pressure
($p_{t}$) at the center of stars PSR J1614-2230 and SAX J1808.4-3658 for the
range $n$ mentioned in Table 1, i.e, pressure anisotropies vanish at the
center, $\Delta(0)=0$ and increase outwards [Bowers & Liang  (1974), Ivano
(2002)].

##  7 Physical Stability analysis

###  7.1 Zeldovich’s condition

The values of $p_{r}$, $p_{t}$ and $\rho$ at the center are given by

$\displaystyle 8\pi p_{rc}=8\pi
p_{tc}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$\displaystyle=a\csc^{n}(c)\frac{\left(-2Pb\sqrt{a\csc^{n}(c)}+4bQ+\beta_{1}\beta_{2}Q\right)}{\left(2Pb\sqrt{a\csc^{n}(c)}-\beta_{1}\beta_{2}Q\right)}>0,$

and

$\displaystyle 8\pi\rho_{c}$ $\displaystyle=$ $\displaystyle
3a\csc^{n}(c)>0~{}~{}\textit{if}~{}~{}a>0.$ (36)

Using Zeldovich’s condition [Zeldovich & Novikov (1971)], i.e.,
${p_{rc}}/{\rho_{c}}\leq 1$, we get

$\displaystyle\frac{-2Pb\sqrt{a\csc^{n}(c)}+4bQ+\beta_{1}\beta_{2}Q}{3\left(2Pb\sqrt{a\csc^{n}(c)}-\beta_{1}\beta_{2}Q\right)}\leq
1,$ (37)

In view of (36) and (37), we get the following inequality

$\displaystyle\frac{2Ab\sqrt{a\csc^{n}(c)}}{4b+\beta_{1}\beta_{2}}\leq\frac{Q}{P}\leq\frac{2Ab\sqrt{a\csc^{n}(c)}}{b+\beta_{1}\beta_{2}},$
(38)

where

$\displaystyle\beta_{1}$ $\displaystyle=$
$\,{}_{2}F_{1}\left(\frac{1}{2},\frac{n+2}{4};\frac{3}{2};\cos^{2}(c)\right),$
$\displaystyle\beta_{2}$ $\displaystyle=$ $\displaystyle
a\cos(c)\sin^{\frac{n}{2}}(c)\csc^{n}(c).$

####  7.1.1 Hererra cracking stability of an anisotropic fluid sphere

The Hererra cracking method [Herrera  (1992)] is used to analyze the stability
of anisotropic stars under radial perturbations. We also employ the concept of
cracking due to Abreu et al (2007) to analyze potentially stable regions
within the stellar configuration by subjecting our model to the condition
$-1<v^{2}_{t}-v^{2}_{r}\leq 0$

$\displaystyle\frac{dp_{t}}{d\rho}=\frac{dp_{r}}{d\rho}+\frac{d\Delta}{d\rho}=\frac{dp_{r}}{d\rho}+\frac{d\Delta}{d\rho}\frac{dr}{d\rho},$
(39) $\displaystyle
v^{2}_{r}-v^{2}_{t}=-\frac{d\Delta}{d\rho}\frac{dr}{d\rho}.$ (40)

For a physically feasible model of anisotropic fluid sphere the radial and
transverse velocities of sound should be less than 1, which are referred to as
causality conditions in the literature. The profiles of $v^{2}_{r}$ and
$v^{2}_{t}$ of stars PSR J1614-2230 and SAX J1808.4-3658 for the range $n$
mentioned in Table 1 are given in Fig.(10), which shows that $0<v^{2}_{r}\leq
1$ and $0<v^{2}_{t}\leq 1$ everywhere within the stellar configuration.
Therefore, both the speeds satisfy the causality conditions and monotonically
decreasing nature. Here, we use the Herrera cracking method [Herrera  (1992)]
for analyzing the stability of anisotropic stars under the radial
perturbations. Using the concept of cracking, Abreu et al (2007) gave the idea
that the region of the anisotropic fluid sphere where
$-1<v^{2}_{t}-v^{2}_{r}\leq 0$ is potentially stable. Fig.(11) clearly depicts
that our model is potentially stable inside the both stars PSR J1614-2230 and
SAX J1808.4-3658 for the range $n$ mentioned in Table 1.

####  7.1.2 Bondi stability condition for adiabatic index

For a relativistic anisotropic sphere the stability depends on the adiabatic
index $\Gamma_{r}$, the ratio of two specific heats, defined by Heintzmann &
Hillebrandt (1975),

$\Gamma_{r}=\frac{\rho+p_{r}}{p_{r}}\frac{\partial p_{r}}{\partial\rho}$.

Bondi  (1964) suggested that for a stable Newtonian sphere, $\Gamma$ value
should be greater than $\frac{4}{3}$. For an anisotropic relativistic sphere
the stability condition is given by Chan et al  (1993),

$\Gamma>\frac{4}{3}+\big{[}\frac{4(p_{t0}-p_{r0})}{3|p^{{}^{\prime}}_{r0}|r}+\frac{\rho_{0}p_{r0}}{2|p^{{}^{\prime}}_{r0}|}r\big{]}$,

where $p_{r0},p_{t0}$ and $\rho_{0}$ represent the initial radial pressure,
tangential pressure and energy density respectively in static equilibrium. The
first and last term inside the square brackets represent the anisotropic and
relativistic corrections respectively. Moreover, both the quantities are
positive and increase the unstable range of $\Gamma$.

Chandrasekhar  (1964a) established a condition on $\Gamma$ to study the
stability of interior of Schwarzschild metric and it is defined as

$\displaystyle\Gamma$ $\displaystyle>$
$\displaystyle\Gamma_{cr}=\frac{4}{3}+\frac{19}{42}{(2\delta)},$ (41)

where $\delta$ is compactification factor and $\Gamma_{cr}$ is the critical
adiabatic index which is determined from neutral configuration.

Moustakidis  (2017) suggested that in the interior of fluid sphere
$\Gamma_{cr}$ should linearly depend on the pressure and density rations at
center and $\Gamma>\Gamma_{cr}$ . For stable Newtonian sphere, Bondi and
Chandrasekhar suggested that $\Gamma>\frac{4}{3}$ [Bondi  (1964),
Chandrasekhar  (1964a, b)].

The present class of models satisfy Bondi, Chandrasekhar, Moustakidis
conditions for both the compact stars PSR J1614-2230 and SAX J1808.4-3658 for
the range of $n$ mentioned in Table 1 and $\Gamma_{cr}$ linearly depend on the
ratio $\frac{p_{r}(0)}{\rho(0)}$ .

####  7.1.3 Energy conditions

For a physically stable static model the interior of the star should satisfy
(i) null energy condition $\rho+p_{r}\geq 0$ (NEC) (ii) weak energy conditions
$\rho+p_{r}\geq 0$, $\rho\geq 0$ (WECr) and $\rho+p_{t}\geq 0$, $\rho\geq 0$
(WECt) and (iii) strong energy condition $\rho+p_{r}+2p_{t}\geq 0$ (SEC)
[Maurya et al  (2019b)]. The profiles of energy conditions i.e. NEC, WEC, SEC
are displayed in Fig.(13) and our models satisfy all the energy conditions for
both the stars PSR J1614-2230 and SAX J1808.4-3658 for the range $n$ mentioned
in Table 1.

###  7.2 Tolman-Oppenheimer-Volkoff condition for equilibrium under three
forces

The Tolman-Oppenheimer-Volkoff (TOV) equation [Ponce de Leon  (1987)] for
anisotropic fluid matter distribution is given as

$\displaystyle-{M_{g}(r)(\rho+p_{r})\over
r^{2}}~{}e^{(\lambda(r)-\nu(r))/2}-{dp_{r}\over dr}+{2\Delta(r)\over r}=0,$
(42)

where $F_{g}$, $F_{h}$, $F_{a}$ are gravitational, hydrostatic and anisotropic
forces respectively and $M_{g}(r)$ is the gravitational mass can be obtained
from the Tolman-Whittaker formula

$\displaystyle M_{g}(r)$ $\displaystyle=$ $\displaystyle{1\over
2}~{}r^{2}\nu^{\prime}(r)e^{(\nu(r)-\lambda(r))/2}.$ (43)

The TOV equation (42) can be expressed in the following balanced force
equation

$F_{g}+F_{h}+F_{a}=0,.$ (44)

In an equilibrium state the three forces $F_{g}$, $F_{h}$ and $F_{a}$ satisfy
TOV equation. The profiles of the three forces of the stars PSR J1614-2230,
SAX J1808.4-3658 are exhibited in Fig.(14) and in which $F_{g}$ overshadows
the other two forces $F_{h}$ and $F_{a}$ such that the system to be in a
static equilibrium.

###  7.3 Harrison-Zeldovich-Novikov Static stability criterion

The Harrison-Zeldovich-Novikov static stability criteria for non-rotating
spherically symmetric equilibrium stellar models provides that the mass of
compact stars must be an increasing function of its central density under
small radial pulsation i.e.

$\displaystyle\frac{\partial M}{\partial\rho_{c}}>0.$ (45)

This criteria ensures that the model is static and stable. It was proposed by
Harrison et al (1965) and Zeldovich & Novikov (1971) independently for stable
stellar models. With the help of (36) and total mass

$\displaystyle
M=m(R)=\frac{aR^{3}\csc^{n}\left(bR^{2}+c\right)}{2\left(aR^{2}\csc^{n}\left(bR^{2}+c\right)+1\right)},$
(46)

The expression of the mass in terms of the central density is given by

$\displaystyle M(\rho_{c})=\frac{\rho
R^{3}\csc^{-n}(c)\csc^{n}\left(bR^{2}+c\right)}{2\left(\rho
R^{2}\csc^{-n}(c)\csc^{n}\left(bR^{2}+c\right)+3\right)}.$

Also,

$\displaystyle\frac{\partial
M}{\partial\rho_{c}}=\frac{R^{3}\csc^{-n}(c)\csc^{n}\left(bR^{2}+c\right)}{6\left(\frac{1}{3}\rho
R^{2}\csc^{-n}(c)\csc^{n}\left(bR^{2}+c\right)+1\right)^{2}}>0,$

satisfies (Fig.15) the static stability criterion (45).

The Harrison-Zeldovich-Novikov condition is satisfied for both the stars PSR
J1614-2230 and SAX J1808.4-3658 for the range $n$ mentioned in Table 1.

##  8 Discussion and Conclusion

Table 1: The variation in physical parameters, i.e., central adiabatic index, central density, central red-shift, surface red-shift and compactness factor for different models of (i)PSR J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for parameters $n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass $M=0.9M_{\odot}$ and radius $R=7.951$km for parameters $n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ for the values of $b=0.0001/km^{2}$, $c=2.5$, $G=6.67\times 10^{-11}m^{3}kg^{-1}s^{-2}$, $M_{\odot}=2\times 10^{30}kg$ and $C=3\times 10^{8}ms^{-1}$. |  $n=13.5$ |  $n=18.66$ |  $n=23.82$ |  $n=28.98$ |  $n=9.56$ |  $n=13.14$ |  $n=16.72$ |  $n=20.3$
---|---|---|---|---|---|---|---|---
Central adiabatic index($\Gamma_{c}$) |  2.5881 |  3.2254 |  4.5 |  8.0523 |  4.2634 |  5.1352 |  6.7296 |  9.76
Central density($\rho_{c}$ $g/cm^{3}\times 10^{14}$) |  4.8075 |  4.3597 |  3.9575 |  3.5959 |  3.6093 |  3.4397 |  3.2792 |  3.127
Central radial Pressure ($P_{r_{c}}$) ($dyne/cm^{2}$ $\times 10^{34}$) |  9.008 |  9.5265 |  9.9761 |  10.362 |  2.5136 |  2.7694 |  3.0125 |  3.2432
Central red-shift ($z_{c}$) |  0.5531 |  0.5482 |  0.5435 |  0.5389 |  0.22474 |  0.22402 |  0.22332 |  0.22262
Surface red-shift ($z_{b}$) |  0.29815 |  0.29815 |  0.29815 |  0.29815 |  0.13694 |  0.13694 |  0.13694 |  0.13694
Compactness factor $\frac{GM}{C^{2}R}$ |  0.30134 |  0.30134 |  0.30134 |  0.30134 |  0.16777 |  0.16777 |  0.16777 |  0.16777

Our aim in this paper is to use the Karmarkar condition (which is purely
geometric) to establish a physically viable stellar model (albeit a toy
model). Toy models are important as they give a sense of the behaviour of the
various physical and thermodynamical properties of the star and assist in
setting up numerical codes and simulations.

In this paper, we have explored a new parametric class of solutions for
anisotropic matter distribution to model the compact star PSR J1614-2230 and
strange star SAX J1808.4-3658 by invoking the Karmarkar condition and adopting
a form for one of the metric potentials, $e^{\lambda(r)}$. We find a range for
one of the parameters, $n$ for the both stars such that the solutions are well
behaved for particular choices of the free constants $b,~{}c$. We have
analyzed all the geometrical and physical properties of these two stars and
verified the physically viability of the solutions for the same range of $n$.

The graphs of the two stars for different models i.e. (i)
$n=13.5,~{}18.66,~{}23.82,~{}28.98$ for PSR J1614-2230; (ii)
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ for SAX J1808.4-3658 for parameters
values of $b=0.0001/km^{2}$, $c=2.5/km^{2}$ are plotted to find the range of
$n$ such that the solutions are well behaved. Furthermore, we concluded that
the range of well behaved solutions for PSR J1614-2230 is
$n=13.5~{}\mbox{to}~{}28.98$ and for SAX J1808.4-3658 is
$n=9.56~{}\mbox{to}~{}20.3$ corresponding to same parameter values $b,~{}c$.

For any value in the range of $n$ the geometrical parameters
$(e^{-\lambda(r)}$ and $e^{\nu(r)}$) are decreasing and increasing
respectively throughout interior of the stars and both curves meet at their
boundary (Fig.1). The physical parameters such as density, radial and
tangential pressures, pressures to density ratios, red-shift, both the
velocities in that range of $n$ are non-negative at the center and
monotonically decreasing from center to surface of the stars Figs.
(2,3,4,7,10). Physical parameters mass, compactification factor, anisotropy
and adiabatic index are increasing outward which is required for a physically
viable stellar configuration Figs.(6,8,9,12).

Our models satisfy all the stability conditions for the two stars for any
value of $n$ in that range, i.e, Herrera cracking condition
($-1<v_{t}^{2}-v_{r}^{2}<0$, $0<v_{r}^{2},~{}v_{t}^{2}<1$), Bondi condition
($\Gamma>4/3$), Zeldovich’s condition
($0<\frac{p_{r}}{\rho},~{}\frac{p_{r}}{\rho}<1$) and Harrison-Zeldovich-
Novikov criterion ($\frac{\partial M}{\partial\rho_{c}}>0$) Figs.(11,12,15).
For the same range of $n$ of the both stars the present models hold all the
energy conditions ($\rho>0$, $\rho+p_{r}>0$, $\rho+p_{t}>0$,
$\rho+p_{r}+2p_{t}>0$) which are required for a physically viable
configuration (Fig.13). Furthermore, our models represent a static anisotropic
stellar fluid in equilibrium configuration as the gravitational force, the
hydrostatic force and the anisotropic force are acting in the interior stars
through the TOV equation are counter-balancing each other (Fig.14).

The physical quantities i.e., central adiabatic index ($\Gamma_{c}$), central
density ($\rho_{c}$), central pressure ($p_{r_{c}}$), central red-shift
($z_{c}(r)$), surface red-shift ($z_{s}(c)$) and compactness factor
($u(r)=\frac{GM}{cR^{2}}$) are given in Table 1. From Table 1 we conclude that
the larger the value of $n$, the central adiabatic index and central pressure
are increasing, whereas the central density and central red-shift are
decreasing with increasing the value of $n$. Other physical parameters i.e.
compactification factor and red-shift at the surface remain constant for any
value of the range $n$. This work has provided a family of parametric
solutions of the Einstein field equations obeying the Karmarkar condition. We
show that these solutions are sufficiently useful to model compact objects and
predict their observed stellar characteristics within very good approximation.

## Appendix: Generating function

All the spherically symmetric solutions can be generated from the two
generating functions given by Herrera et al  (2008). The two primitive
generating functions $\eta(r)$ and $\Pi(r)$ are given as

$\displaystyle e^{\nu(r)}=$ $\displaystyle
e^{\big{[}\int{(2\eta{(r)}-\frac{2}{r}})dr\big{]}},\quad\Pi(r)=8\pi(p_{r}-p_{t}).$
(47)

The two generating functions pertaining to the present class of solutions are
obtained as

$\displaystyle\eta(r)=~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$\displaystyle\frac{\sqrt{a}Qh_{1}(r)\cos\left(br^{2}+c\right)-2b\left(\sqrt{a}Qr^{2}\csc^{\frac{n}{2}}\left(br^{2}+c\right)+P\right)}{r\left(\sqrt{a}Qh_{1}(r)\cos\left(br^{2}+c\right)-2Pb\right)}$

and

$\displaystyle\Pi(r)$ $\displaystyle=$ $\displaystyle
8\pi(p_{r}-p_{t})=-8\pi\Delta.$

## Appendix: Equation of state

The equation of state is defined as the relation between radial pressure
($p_{r}$) and density ($\rho$) within the star. Since the presence of
cumbersome transformation of $p_{r}$ in terms of $\rho$, here we use curve
fitting technique of approximation to get equation of state. Further, from
Fig.(10), we observe that the plot of $v_{r}=\sqrt{\frac{dp_{r}}{d\rho}}$ is
not a straight line (i.e. $\frac{dp_{r}}{d\rho}$ is not a constant),
therefore, it is necessary that the relation between $p_{r}$ and $\rho$ is
parabolic in nature. Consequently, in order to get the equation of state we
consider the curve fitting method for quadratic form

$\displaystyle p_{r}(r)$ $\displaystyle=$ $\displaystyle
U+T\rho(r)+S\rho^{2}(r),$ (48) $\displaystyle\Sigma p_{r}(r)$ $\displaystyle=$
$\displaystyle 11U+T\Sigma\rho(r)+S\Sigma\rho^{2}(r),$ (49)
$\displaystyle\Sigma\rho(r)~{}p_{r}(r)$ $\displaystyle=$ $\displaystyle
U\Sigma\rho(r)+T\Sigma\rho^{2}(r)+S\Sigma\rho^{3}(r)$ (50)
$\displaystyle\Sigma\rho^{2}(r)~{}p_{r}(r)$ $\displaystyle=$ $\displaystyle
U\Sigma\rho^{2}(r)+T\Sigma\rho^{3}(r)+S\Sigma\rho^{4}(r),$ (51)

where, $r$ varies from central to boundary of the star. To find the curve via
least square method, we consider the points with the differences $0.969$,
$0.7951$ for PSR J1614-2230, SAX J1808.4-3658 respectively. Solving the
Eqns.(49,50,51) for $S$, $T$, $U$ and substituting the values in Eq.(48) , we
get required equation of state.

Figure 1: Variation of $e^{-\lambda(r)}$, $e^{\nu(r)}$ with $r$ for (i) PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 2: Variation of $\rho$ with $r$ for (i)PSR J1614-2230 with mass
$M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 3: Variation of $p_{r}$, $p_{t}$ with $r$ for (i)PSR J1614-2230 with
mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 4: Variation of $p_{r}/\rho$ and $p_{t}/\rho$ with $r$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 5: Variation of equation of state parameters with $\rho$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the model
$n=13.5$; (ii) SAX J1808.4-3658 with mass $M=0.9M_{\odot}$ and radius
$R=7.951$km for the model $n=~{}9.56$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 6: Variation of mass ($m(r)$) with $r$ for (i)PSR J1614-2230 with mass
$M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 7: Variation of red-shift with $r$ for (i)PSR J1614-2230 with mass
$M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 8: Variation of the compactification factor $u(r)$ with $r$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 9: Variation of anistropy $\Delta(r)$ with $r$ for (i)PSR J1614-2230
with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 10: Variation of $v_{r}^{2}$, $v_{t}^{2}$ with $r$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 11: Variation of ${v_{t}}^{2}-{v_{r}}^{2}$ with $r$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 12: Variation of $\Gamma(r)$ with $r$ for (i)PSR J1614-2230 with mass
$M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 13: Variation of energy conditions with $r$ for (i)PSR J1614-2230 with
mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 14: Variation of balancing forces
$F_{a},~{}F_{g},~{}F_{a},~{}F_{a}+F_{g}+F_{h}$ with $r$ for (i)PSR J1614-2230
with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Figure 15: Variation of mass with central density $\rho_{c}$ for (i)PSR
J1614-2230 with mass $M=1.97M_{\odot}$ and radius $R=9.69$km for the models
$n=13.5,~{}18.66,~{}23.82,~{}28.98$; (ii) SAX J1808.4-3658 with mass
$M=0.9M_{\odot}$ and radius $R=7.951$km for the models
$n=~{}9.56,~{}13.14,~{}16.72,~{}20.3$ and the values of $b=0.0001/km^{2}$,
$c=2.5$.

Acknowledgments The authors are thankful to the learned referee for the
valuable comments and suggestions to improve the paper.

## References

## References

  * Abreu et al (2007) Abreu, H., et al 2007, Class. Quantum Grav., 24, 4631
  * Andreasson et al (2012) Andreasson, H., Boehmer, C. G., & Mussa, A. 2012, Class. Quantum Grav., 29, 095012
  * Akiyama et al (2019) Akiyama, K. et al 2019, Event Horizon Telescope Collaboration Astrophys.J., L1, 875, 1. arXiv:1906.11238 [astro-ph.GA]
  * Bhar (2019) Bhar, P. 2019, Eur. Phys. J. C, 79, 138
  * Biswas et al (2019) Biswas, S., Shee, D., et al 2019, Annals of Phys., 409, 167905
  * Bondi (1964) Bondi, H. 1964, Proc. R. Soc. Lond. A, 281, 39
  * Bowers & Liang (1974) Bowers, R.L., & Liang, E.P.T. 1974, Astrophys. J., 188, 657
  * Buchdahl (1959) Buchdahl, H. A. 1959, Phys. Rev. D, 116, 1027
  * Chan et al (1993) Chan, R., et al 1993, Mon. Not. R. Astron. Soc., 265, 533
  * Chan et al (1994) Chan, R., Herrera, L., & Santos, N. O. 1994, Mon. Not. R. Astron. Soc., 267, 637
  * Chandrasekhar (1964a) Chandrasekhar, S. 1964, Astrophys, J., 140, 417
  * Chandrasekhar (1964b) Chandrasekhar, S. 1964, Phys. Rev. Lett.,12, 114
  * Dev & Gleiser (2002) Dev, K., & Gleiser, M. 2002, Gen. Relativ. Gravit., 34, 1793
  * Dev & Gleiser (2003) Dev, K., & Gleiser, M. 2003, Gen. Relativ. Gravit. 35, 1435
  * Di Prisco et al (2007) Di Prisco, A., Herrera, L., Le Denmat, G., MacCallum, M. A. H., & Santos, N. O. 2007, Phys. Rev. D, 76, 064017
  * Di Prisco et al (1997) Di Prisco, A., Herrera, L., Falcon, N., Esculpi, M., & Santos, N. O. 1997, Gen. Relativ. Gravit., 29, 1391
  * Fuloria (2017) Fuloria, P. 2017, Astro. phys. space sci., 362, 217
  * Gangopadhyay et al (2013) Gangopadhyay, T., et al 2013, Mon. Not. R. Astron. Soc., 431, 3216
  * Gedela et al (2018) Gedela, S., Bisht, R. K., & Pant, N. 2018, Eur. Phys. J. A, 54, 207
  * Gedela et al (2019a) Gedela, S., Bisht, R. K., & Pant 2019, N., Mod. Phys. Lett. A., 34, 195015754
  * Gedela et al (2019b) Gedela, S., Pant, R.P, Bisht, R. K., & Pant, N. 2019, Eur. Phys. J. A, 55, 95
  * Gedela et al (2019c) Gedela, S., Pant, N., Pant, R.P, & Upreti, J. 2019, Int. J. Mod. Phys. A., 34, 1950179
  * Gedela et al (2020) S. Gedela, Bisht, R.K., & Pant, N. 2020, Mod. Phys. Let. A, 33, 2050097
  * Ghosh & Maharaj (2015) Ghosh, S. G., & Maharaj, S. D 2015, Eur. Phys. J. C, 75, 7
  * Govender et al (2010) Govender, G., Govender, M., & Govinder, K. S. 2010, Int. J. Mod. Phys. D 19, 1773
  * Govender (2013) Govender, M. 2013, Int. J. Mod. Phys. D 22, 1350049
  * Govender & Govinder (2001) Govender, M., & Govinder, K. S. 2001, Phys. Lett. A, 283, 71
  * Guo & Joshi (2015) Guo, J., & Joshi, P. S. 2015, Phys. Rev. D, 92, 064013
  * Harrison et al (1965) Harrison, B.K., et al 1965, Gravitational Theory and Gravitational Collapse, University of Chicago Press, Chicago.
  * Heintzmann & Hillebrandt (1975) Heintzmann, H., & Hillebrandt, W. 1975, Astron. Astrophys., 38, 51
  * Herrera & Martinez (1998) Herrera, L., & Martinez, J. 1998, Gen. Relativ. Gravit., 30, 445
  * Herrera (1992) Herrera, L. 1992, Phys. Lett. A, 165, 206
  * Herrera et al (2005a) Herrera, L., Le Denmat, G., Marcilhacy, G., & Santos, N. O. 2005, Int.J.Mod.Phys. D, 14, 657
  * Herrera et al (2005b) Herrera, L., et al 2005, Gen. Relativ. Gravit., 37, 873
  * Herrera et al (2008) Herrera, L., Ospino, J., & Di Prisco, A. 2008, Phys. Rev. D, 77, 027502
  * Herrera et al (1989) Herrera, L., Le Denmat, G., & Santos, N. O. 1989 Mon. Not. R. Astron. Soc., 237, 257
  * Ivano (2002) Ivanov, B.V. 2002, Phys. Rev. D, 65, 104011
  * Ivanov (2018) Ivanov, B. V. 2018, Eur. Phys. J. C, 78, 332
  * Ivano (2020) Ivanov, B. V. 2020, Eur. Phys. J. Plus, 135, 377
  * Jasim et al (2020) Jasim, M.K., Maurya, S.K., & Al Sawaii, A. S. M. 2020, Astrophys Space Sci., 365, 9
  * Karmarkar (1948) Karmarkar, K.R. 1948, Proc. Indian. Acad. Sci. A, 27, 56
  * Karmarkar et al (2007) Karmarkar, S., Mukherjee, S., Sharma, R., & Maharaj, S. D. 2007, Pramana J. Phys., 68, 881
  * Manjonjo et al (2018) Manjonjo, A.M., Maharaj, S. D., & Moopanar, S. 2018, Class. Quantum Grav., 35, 045015
  * Maurya & Govender (2017) Maurya, S.K., & Govender, M. 2017, Eur. Phys. J. C, 77, 420
  * Maurya et al (2016) Maurya, S.K., et al 2016, Eur. Phys. J. A 52, 191
  * Maurya et al (2019a) Maurya, S.K., et al 2019, Phys. Rev. D, 100, 044014
  * Maurya et al (2019b) Maurya, S. K., et al 2019, Phys. Rev. D, 99, 044029
  * Maurya et al (2019c) Maurya, S. K., Maharaj, S. D., & Deb, D. 2019, Eur. Phys. J. C, 79, 170
  * Moustakidis (2017) Moustakidis, Ch. C. 2017, Gen. Relativ. Gravit., 49, 68
  * Mukherjee et al (1997) Mukherjee, S., Paul, B.C., & Dadhich, N. 1997, Class. Quantum Grav., 14, 3475
  * Naidu et al (2018) Naidu, N.F., Govender, M., & Maharaj, S.D. 2018, Eur. Phys. J. C, 78, 48
  * Oppenheimer & Snyder (1939) Oppenheimer, J. P., & Snyder, H. 1939, Phys. Rev., 56, 455
  * Pandey & Sharma (1981) Pandey, S.N., & Sharma, S.P. 1981, Gen. Relativ. Gravit., 14, 113
  * Pant et al (2016) Pant, N., Pradhan, N., & Bansal, R. K. 2016, Astrophys. Space Sci., 361, 41
  * Pant et al (2020) Pant, N., Gedela, S., & Bisht, R. K. 2020, Chin. J. Phys. DOI: 10.1016/j.cjph.2020.06.020
  * Ponce de Leon (1987) Ponce de Leon, J. 1987, Gen. Relativ. Gravit. 19, 797
  * Santos (1985) Santos, N. O. 1985, Mon. Not. R. Astron. Soc., 216, 403
  * Sarkar et al (2020) Sarkar, N., et al 2020, Eur. Phys. J. C, 80, 255
  * Schwarzschild (1916a) Schwarzschild, K. 1916, Sitz. Deut. Akad.Wiss. Berlin Kl.Math. Phys., 1916, 189. arXiv:physics/9905030
  * Schwarzschild (1916b) Schwarzschild, K. 1916, Sitz. Deut. Akad.Wiss. Berlin Kl.Math. Phys., 24, 424. arXiv:physics/9912033.
  * Sharma & Mukherjee (2001a) Sharma, R., & Mukherjee, S. 2001, Mod. Phys. Lett. A, 16, 1049
  * Sharma et al (2001b) Sharma, R., Mukherjee, S., & Maharaj, S. D. 2001, Gen. Relativ. Grav., 33, 999
  * Sharma & Maharaj (2007) Sharma, R., Maharaj, S.D. 2007, J. Astrophys. Astron., 28, 133
  * Sherif et al (2019) Sherif, A., Goswami, R., & Maharaj, S. 2019, Class. Quantum Grav., 36, 215001
  * Singh et al (2016) Singh, K. N., Pant, N., & Pradhan, N. 2016, Astrophys. Space Sci., 361, 173
  * Sing et al (2020) Singh, K. N., et al. 2020, Chin. Phys. C, 44, 035101
  * Stephani et al (2003) Stephani, H., Kramer, D., et.al. 2003, Exact Solutions of Einstein’s Field Equations, 2nd Edition, Cambridge University Press
  * TellOrtiz et al (2019) Tello-Ortiz, F., Maurya, S. K., Errehymy, A., Singh, N. K., & Daoud, M. 2019, Eur. Phys. J. C, 79, 885
  * Upreti et al (2020) Upreti, J., Gedela, S., Pant, N., & Pant, R.P 2020, New Astronomy, 80, 101403
  * Vaidya (1951) Vaidya, P. C. 1951, Proc. Indian Acad. Sc. A, 33, 264
  * Zeldovich & Novikov (1971) Zeldovich, Y.B., & Novikov, I.D. 1971, Relativistic Astrophysics Vol. 1: Stars and Relativity, University of Chicago Press, Chicago